diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-12-12 17:14:28 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-12-12 17:14:28 +0100 |
commit | dce1bedcf716fb84ac541a8b7316e692e52f9fc9 (patch) | |
tree | 2611fe2535d1628d4e85ce5db56336bb56857d0a | |
parent | bd518bdba264f3d5c489c83978de120be7444139 (diff) | |
download | gnunet-dce1bedcf716fb84ac541a8b7316e692e52f9fc9.tar.gz gnunet-dce1bedcf716fb84ac541a8b7316e692e52f9fc9.zip |
need patience for http download
-rwxr-xr-x | src/gns/test_plugin_rest_gns.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gns/test_plugin_rest_gns.sh b/src/gns/test_plugin_rest_gns.sh index 1412f8753..25c39f135 100755 --- a/src/gns/test_plugin_rest_gns.sh +++ b/src/gns/test_plugin_rest_gns.sh | |||
@@ -22,15 +22,20 @@ curl_get () { | |||
22 | #$1 is link | 22 | #$1 is link |
23 | #$2 is grep | 23 | #$2 is grep |
24 | XURL=`which gnurl || which curl` | 24 | XURL=`which gnurl || which curl` |
25 | echo "Using $XURL to download $1" | 25 | if [ "" = "$XURL" ] |
26 | then | ||
27 | echo "HTTP client (curl/gnurl) not found, exiting" | ||
28 | exit 77 | ||
29 | fi | ||
30 | sleep 0.5 | ||
26 | cache="$(${XURL} -v "$1" 2>&1 | grep "$2")" | 31 | cache="$(${XURL} -v "$1" 2>&1 | grep "$2")" |
27 | #echo "$cache" | 32 | #echo "$cache" |
28 | if [ "" = "$cache" ] | 33 | if [ "" = "$cache" ] |
29 | then | 34 | then |
30 | gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1 | 35 | gnunet-identity -D "$TEST_TLD" -c test_gns_lookup.conf > /dev/null 2>&1 |
31 | gnunet-arm -e -c test_gns_lookup.conf | 36 | gnunet-arm -e -c test_gns_lookup.conf |
32 | echo "HTTP client (curl/gnurl) not found, exiting" | 37 | echo "Download of $1 using $XURL failed" |
33 | exit 77 | 38 | exit 1 |
34 | fi | 39 | fi |
35 | } | 40 | } |
36 | TEST_TLD="testtld" | 41 | TEST_TLD="testtld" |