REST: nothing triggers rest
[oweals/gnunet.git] / src / gns / test_gns_txt_lookup.sh
index 68a60c8b67841bdd9589e759d48dabc68bba3ba4..b0c9144c2c95449fcb168d030d90d3c6c1c51f6b 100755 (executable)
@@ -1,4 +1,5 @@
-#!/bin/bash
+#!/bin/sh
+# This file is in the public domain.
 trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT
 
 LOCATION=$(which gnunet-config)
@@ -13,8 +14,8 @@ then
        exit 77
 fi
 
-rm -rf /tmp/test-gnunet-gns-peer-1/
-which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
+rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
 TEST_TXT="GNS powered txt record data"
 MY_EGO="myego"
 LABEL="testtxt"
@@ -25,9 +26,9 @@ RES_TXT=`$DO_TIMEOUT gnunet-gns --raw -u $LABEL.$MY_EGO -t TXT -c test_gns_looku
 gnunet-namestore -z $MY_EGO -d -n $LABEL -t TXT -V "$TEST_TXT" -e never -c test_gns_lookup.conf
 gnunet-identity -D $MY_EGO -c test_gns_lookup.conf
 gnunet-arm -e -c test_gns_lookup.conf
-rm -rf /tmp/test-gnunet-gns-peer-1/
+rm -rf `gnunet-config -c test_gns_lookup.conf -f -s paths -o GNUNET_TEST_HOME`
 
-if [ "$RES_TXT" == "$TEST_TXT" ]
+if [ "$RES_TXT" = "$TEST_TXT" ]
 then
   exit 0
 else