summaryrefslogtreecommitdiff
path: root/testcurl.sh
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-05-27 12:03:24 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-05-27 12:03:24 +0000
commit55ff4c3f080d11f2ca14290d9fdba7765bd3eb51 (patch)
treee05370e703a9e2bad5a5b29d461209f44ab97414 /testcurl.sh
parent4915002168198ef749b55e6c5015c8830e4a07b3 (diff)
downloadcurl-55ff4c3f080d11f2ca14290d9fdba7765bd3eb51.tar.gz
if cvs update fails, attempt again after 5 seconds and retry 50 times
before giving up
Diffstat (limited to 'testcurl.sh')
-rwxr-xr-xtestcurl.sh26
1 files changed, 23 insertions, 3 deletions
diff --git a/testcurl.sh b/testcurl.sh
index 79d1b32b3..2bb207382 100755
--- a/testcurl.sh
+++ b/testcurl.sh
@@ -106,10 +106,30 @@ fi
cd curl
echo "testcurl: update from CVS"
-# update quietly to the latest CVS
-cvs -Q up -dP 2>&1
-cvsstat=$?
+cvsup() {
+ # update quietly to the latest CVS
+ echo "testcurl: run cvs up"
+ cvs -Q up -dP 2>&1
+
+ cvsstat=$?
+
+ # return (1 - RETURNVALUE) so that errors return 0 while goodness
+ # returns 1
+ return `expr 1 - $?`
+}
+
+att="0"
+while cvsup; do
+ att=`expr $att + 1`
+ echo "testcurl: failed CVS update attempt number $att."
+ if [ $att -gt 50 ]; then
+ cvsstat="BADNESS"
+ break # get out of the loop
+ fi
+ sleep 5
+done
+
echo "testcurl: cvs returned: $cvsstat"
if [ "$cvsstat" -ne "0" ]; then