summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-11-25 22:13:05 +0000
committerng0 <ng0@n0.is>2019-11-25 22:13:05 +0000
commit861eba2bab4465ffc3dc5e6309e89519594f0ea1 (patch)
treead7a82c9848e2bf92f90ff3842abee40daee1fad /src
parent868ad5f875f8e7b271d20b77c7ef47ec53fe187c (diff)
test_gnunet_gns.sh: use shlib
Diffstat (limited to 'src')
-rw-r--r--src/gns/Makefile.am16
-rwxr-xr-xsrc/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)
pkgdata_DATA = \
gnunet-gns-proxy-ca.template
+
+
EXTRA_DIST = \
test_gns_defaults.conf \
test_gns_lookup.conf \
@@ -21,7 +23,8 @@ EXTRA_DIST = \
zonefiles/OEFL7A4VEF1B40QLEMTG5D8G1CN6EN16QUSG5R2DT71GRJN34LSG.zkey \
zonefiles/test_zonekey \
$(check_SCRIPTS) \
- $(pkgdata_DATA)
+ $(pkgdata_DATA) \
+ test_gnunet_gns.sh.in
USE_VPN = $(top_builddir)/src/vpn/libgnunetvpn.la
@@ -91,12 +94,19 @@ bin_SCRIPTS = \
gnunet-gns-proxy-setup-ca
# See: https://www.gnu.org/software/automake/manual/html_node/Scripts.html#Scripts
-do_subst = sed -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'
+do_subst = $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'
gnunet-gns-proxy-setup-ca: gnunet-gns-proxy-setup-ca.in Makefile
$(do_subst) < $(srcdir)/gnunet-gns-proxy-setup-ca.in > gnunet-gns-proxy-setup-ca
- chmod +x gnunet-gns-proxy-setup-ca
+ @chmod +x gnunet-gns-proxy-setup-ca
+
+do_subst_pkgdatadir = $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'
+
+test_gnunet_gns.sh: test_gnunet_gns.sh.in Makefile
+ $(do_subst_pkgdatadir) < $(srcdir)/test_gnunet_gns.sh.in > test_gnunet_gns.sh
+ @chmod +x test_gnunet_gns.sh
+CLEANFILES += test_gnunet_gns.sh
libgnunet_plugin_rest_gns_la_SOURCES = \
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 @@
# if test -z "`which fooble`"; then echo 1; fi
# The command builtin might not work with busybox's ash
# but this works for now.
-existence()
-{
- command -v "$1" >/dev/null 2>&1
-}
+. @pkgdatadir@/existence.sh
LOCATION=`existence gnunet-config`
if test -z $LOCATION; then