aboutsummaryrefslogtreecommitdiff
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
parent868ad5f875f8e7b271d20b77c7ef47ec53fe187c (diff)
downloadgnunet-861eba2bab4465ffc3dc5e6309e89519594f0ea1.tar.gz
gnunet-861eba2bab4465ffc3dc5e6309e89519594f0ea1.zip
test_gnunet_gns.sh: use shlib
-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)
10pkgdata_DATA = \ 10pkgdata_DATA = \
11 gnunet-gns-proxy-ca.template 11 gnunet-gns-proxy-ca.template
12 12
13
14
13EXTRA_DIST = \ 15EXTRA_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
26USE_VPN = $(top_builddir)/src/vpn/libgnunetvpn.la 29USE_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
94do_subst = sed -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' 97do_subst = $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'
95 98
96gnunet-gns-proxy-setup-ca: gnunet-gns-proxy-setup-ca.in Makefile 99gnunet-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
103do_subst_pkgdatadir = $(SED) -e 's,[@]pkgdatadir[@],$(pkgdatadir),g'
104
105test_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
109CLEANFILES += test_gnunet_gns.sh
100 110
101libgnunet_plugin_rest_gns_la_SOURCES = \ 111libgnunet_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.
9existence() 9. @pkgdatadir@/existence.sh
10{
11 command -v "$1" >/dev/null 2>&1
12}
13 10
14LOCATION=`existence gnunet-config` 11LOCATION=`existence gnunet-config`
15if test -z $LOCATION; then 12if test -z $LOCATION; then