diff options
author | ng0 <ng0@n0.is> | 2019-11-25 22:13:05 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-11-25 22:13:05 +0000 |
commit | 861eba2bab4465ffc3dc5e6309e89519594f0ea1 (patch) | |
tree | ad7a82c9848e2bf92f90ff3842abee40daee1fad /src | |
parent | 868ad5f875f8e7b271d20b77c7ef47ec53fe187c (diff) | |
download | gnunet-861eba2bab4465ffc3dc5e6309e89519594f0ea1.tar.gz gnunet-861eba2bab4465ffc3dc5e6309e89519594f0ea1.zip |
test_gnunet_gns.sh: use shlib
Diffstat (limited to 'src')
-rw-r--r-- | src/gns/Makefile.am | 16 | ||||
-rwxr-xr-x | src/gns/test_gnunet_gns.sh.in (renamed from src/gns/test_gnunet_gns.sh) | 5 |
2 files changed, 14 insertions, 7 deletions
diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index 253f67d29..d0a9f07cb 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am | |||
@@ -10,6 +10,8 @@ SUBDIRS = . $(NSS_SUBDIR) | |||
10 | pkgdata_DATA = \ | 10 | pkgdata_DATA = \ |
11 | gnunet-gns-proxy-ca.template | 11 | gnunet-gns-proxy-ca.template |
12 | 12 | ||
13 | |||
14 | |||
13 | EXTRA_DIST = \ | 15 | EXTRA_DIST = \ |
14 | test_gns_defaults.conf \ | 16 | test_gns_defaults.conf \ |
15 | test_gns_lookup.conf \ | 17 | test_gns_lookup.conf \ |
@@ -21,7 +23,8 @@ EXTRA_DIST = \ | |||
21 | zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \ | 23 | zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \ |
22 | zonefiles/test_zonekey \ | 24 | zonefiles/test_zonekey \ |
23 | $(check_SCRIPTS) \ | 25 | $(check_SCRIPTS) \ |
24 | $(pkgdata_DATA) | 26 | $(pkgdata_DATA) \ |
27 | test_gnunet_gns.sh.in | ||
25 | 28 | ||
26 | USE_VPN = $(top_builddir)/src/vpn/libgnunetvpn.la | 29 | USE_VPN = $(top_builddir)/src/vpn/libgnunetvpn.la |
27 | 30 | ||
@@ -91,12 +94,19 @@ bin_SCRIPTS = \ | |||
91 | gnunet-gns-proxy-setup-ca | 94 | gnunet-gns-proxy-setup-ca |
92 | 95 | ||
93 | # See: https://www.gnu.org/software/automake/manual/html_node/Scripts.html#Scripts | 96 | # See: https://www.gnu.org/software/automake/manual/html_node/Scripts.html#Scripts |
94 | do_subst = sed -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' | 97 | do_subst = $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' |
95 | 98 | ||
96 | gnunet-gns-proxy-setup-ca: gnunet-gns-proxy-setup-ca.in Makefile | 99 | gnunet-gns-proxy-setup-ca: gnunet-gns-proxy-setup-ca.in Makefile |
97 | $(do_subst) < $(srcdir)/gnunet-gns-proxy-setup-ca.in > gnunet-gns-proxy-setup-ca | 100 | $(do_subst) < $(srcdir)/gnunet-gns-proxy-setup-ca.in > gnunet-gns-proxy-setup-ca |
98 | chmod +x gnunet-gns-proxy-setup-ca | 101 | @chmod +x gnunet-gns-proxy-setup-ca |
102 | |||
103 | do_subst_pkgdatadir = $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' | ||
104 | |||
105 | test_gnunet_gns.sh: test_gnunet_gns.sh.in Makefile | ||
106 | $(do_subst_pkgdatadir) < $(srcdir)/test_gnunet_gns.sh.in > test_gnunet_gns.sh | ||
107 | @chmod +x test_gnunet_gns.sh | ||
99 | 108 | ||
109 | CLEANFILES += test_gnunet_gns.sh | ||
100 | 110 | ||
101 | libgnunet_plugin_rest_gns_la_SOURCES = \ | 111 | libgnunet_plugin_rest_gns_la_SOURCES = \ |
102 | plugin_rest_gns.c | 112 | plugin_rest_gns.c |
diff --git a/src/gns/test_gnunet_gns.sh b/src/gns/test_gnunet_gns.sh.in index 74c49c537..1c149b141 100755 --- a/src/gns/test_gnunet_gns.sh +++ b/src/gns/test_gnunet_gns.sh.in | |||
@@ -6,10 +6,7 @@ | |||
6 | # if test -z "`which fooble`"; then echo 1; fi | 6 | # if test -z "`which fooble`"; then echo 1; fi |
7 | # The command builtin might not work with busybox's ash | 7 | # The command builtin might not work with busybox's ash |
8 | # but this works for now. | 8 | # but this works for now. |
9 | existence() | 9 | . @pkgdatadir@/existence.sh |
10 | { | ||
11 | command -v "$1" >/dev/null 2>&1 | ||
12 | } | ||
13 | 10 | ||
14 | LOCATION=`existence gnunet-config` | 11 | LOCATION=`existence gnunet-config` |
15 | if test -z $LOCATION; then | 12 | if test -z $LOCATION; then |