gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] 01/02: test_gnunet_gns.sh: use shlib


From: gnunet
Subject: [gnunet] 01/02: test_gnunet_gns.sh: use shlib
Date: Mon, 25 Nov 2019 23:24:58 +0100

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnunet.

commit 861eba2bab4465ffc3dc5e6309e89519594f0ea1
Author: ng0 <address@hidden>
AuthorDate: Mon Nov 25 22:13:05 2019 +0000

    test_gnunet_gns.sh: use shlib
---
 src/gns/Makefile.am                                   | 16 +++++++++++++---
 src/gns/{test_gnunet_gns.sh => test_gnunet_gns.sh.in} |  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
similarity index 95%
rename from src/gns/test_gnunet_gns.sh
rename to 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

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]