need patience for http download
authorChristian Grothoff <christian@grothoff.org>
Thu, 12 Dec 2019 16:14:28 +0000 (17:14 +0100)
committerChristian Grothoff <christian@grothoff.org>
Thu, 12 Dec 2019 16:14:28 +0000 (17:14 +0100)
src/gns/test_plugin_rest_gns.sh

index 1412f87537ca66f77d6b68b29ae60f660726856b..25c39f1350416e36ab46adf33a84d3044b8a3606 100755 (executable)
@@ -22,15 +22,20 @@ curl_get () {
     #$1 is link
     #$2 is grep
     XURL=`which gnurl || which curl`
-    echo "Using $XURL to download $1"
+    if [ "" = "$XURL" ]
+    then
+        echo "HTTP client (curl/gnurl) not found, exiting"
+        exit 77
+    fi
+    sleep 0.5
     cache="$(${XURL} -v "$1" 2>&1 | grep "$2")"
     #echo "$cache"
     if [ "" = "$cache" ]
     then
         gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1
         gnunet-arm -e -c test_gns_lookup.conf
-        echo "HTTP client (curl/gnurl) not found, exiting"
-        exit 77
+        echo "Download of $1 using $XURL failed"
+        exit 1
     fi
 }
 TEST_TLD="testtld"