gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: test_gnunet_gns: Fix test


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: test_gnunet_gns: Fix test
Date: Fri, 15 Mar 2019 14:46:55 +0100

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

ng0 pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new c0332990f test_gnunet_gns: Fix test
c0332990f is described below

commit c0332990f92efcb9569fcb809484f9774eea3a14
Author: ng0 <address@hidden>
AuthorDate: Fri Mar 15 13:46:47 2019 +0000

    test_gnunet_gns: Fix test
---
 src/gns/test_gnunet_gns.sh | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/gns/test_gnunet_gns.sh b/src/gns/test_gnunet_gns.sh
index 7e0b4b5c5..74c49c537 100755
--- a/src/gns/test_gnunet_gns.sh
+++ b/src/gns/test_gnunet_gns.sh
@@ -1,15 +1,25 @@
 #!/bin/sh
 # This file is in the public domain.
-LOCATION=$(which gnunet-config)
-if [ -z $LOCATION ]
-then
-  LOCATION="gnunet-config"
+# test -z being correct was a false assumption here.
+# I have no executable 'fooble', but this will
+# return 1:
+# 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
+}
+
+LOCATION=`existence gnunet-config`
+if test -z $LOCATION; then
+    LOCATION="gnunet-config"
 fi
 $LOCATION --version
 if test $? != 0
 then
-       echo "GNUnet command line tools cannot be found, check environmental 
variables PATH and GNUNET_PREFIX" 
-       exit 77
+    echo "GNUnet command line tools cannot be found, check environmental 
variables PATH and GNUNET_PREFIX" 
+    exit 77
 fi
 
 trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT

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



reply via email to

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