-fix #3301
[oweals/gnunet.git] / src / namestore / test_namestore_put.sh
index bddefac49deaf173c3809abadb78f0eb5be6aa1a..6b6647d5f1ecac3eb08d063717753a46ba97b068 100755 (executable)
@@ -5,11 +5,16 @@ trap "gnunet-arm -e -c $CONFIGURATION" SIGINT
 LOCATION=$(which gnunet-config)
 if [ -z $LOCATION ]
 then
-       echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" 
-       exit 1
+  LOCATION="gnunet-config"
+fi
+$LOCATION --version 1> /dev/null
+if test $? != 0
+then
+       echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX"
+       exit 77
 fi
 
-rm -rf `gnunet-config -c $CONFIGURATION -s PATHS -o GNUNET_HOME`
+rm -rf `$LOCATION -c $CONFIGURATION -s PATHS -o GNUNET_HOME`
 TEST_DOMAIN_PLUS="www.gnu"
 TEST_DOMAIN_DNS="www3.gnu"
 TEST_IP_PLUS="127.0.0.1"