-tolerate it if gnunet://gns/ URI prefix is in upper case
[oweals/gnunet.git] / src / namestore / test_namestore_lookup.sh
index c080fa9619d8a072b90dcd3c0ca5de7c2f37ad52..90735b17e094fd0e67c624a9f98fa28807658f80 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_IP_PLUS="127.0.0.1"
 TEST_RECORD_NAME_DNS="www3"
 which timeout &> /dev/null && DO_TIMEOUT="timeout 5"