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