-fix #3301
[oweals/gnunet.git] / src / namestore / test_namestore_put.sh
index f5204dc356d77c2cf939092385527c359d9cbbe3..6b6647d5f1ecac3eb08d063717753a46ba97b068 100755 (executable)
@@ -1,7 +1,20 @@
 #!/bin/bash
 CONFIGURATION="test_namestore_api.conf"
 trap "gnunet-arm -e -c $CONFIGURATION" SIGINT
-rm -rf `gnunet-config -c $CONFIGURATION -s PATHS -o GNUNET_HOME`
+
+LOCATION=$(which gnunet-config)
+if [ -z $LOCATION ]
+then
+  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 `$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"