[SCM] debian-live/autotesting branch, master, updated. 9c5143b50da2155314f60f09166d45a23b762492

Chris Lamb chris at chris-lamb.co.uk
Fri Aug 8 22:58:07 UTC 2008


The following commit has been merged in the master branch:
commit 703f94620fb5a56e84e054375cc5155caaaa981a
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date:   Fri Aug 8 23:08:24 2008 +0100

    Use pattern-matching of "case" statement instead of ${FOO:x:y}
    
    Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>

diff --git a/run-batch-autotesting.sh b/run-batch-autotesting.sh
index 5a086ae..d7275c3 100755
--- a/run-batch-autotesting.sh
+++ b/run-batch-autotesting.sh
@@ -75,10 +75,11 @@ do
     then
         echo "$BASE_NAME already downloaded today "
         echo " - skipping download and testing. To retest please remove file or set ctime>1 day"
-    else
-        HTTP=${URL:0:4}
-        if [ "$HTTP" = "http" ]
-        then
+        continue
+    fi
+
+    case "${URL}" in
+        http*)
             echo "Downloading $URL"
             rm $DIRECTORY/$BASE_NAME 2>/dev/null
             rm $DIRECTORY/$MD5SUM_FILE 2>/dev/null
@@ -86,7 +87,8 @@ do
             wget --no-verbose --tries=3 --timeout=60 --directory-prefix=$DIRECTORY $MD5SUMS
             MD5SUM_LOCAL=$(md5sum $DIRECTORY/$BASE_NAME | cut --fields=1 --delimiter=\  )
             MD5SUM_REMOTE=$(cat $DIRECTORY/$MD5SUM_FILE | grep "$BASE_NAME" | head -n 1 | cut --fields=1 --delimiter=\  )
-        else
+            ;;
+        *)
             echo "Local file - assuming already in place"
             MD5SUM_LOCAL="ok"
             MD5SUM_REMOTE="$MD5SUM_LOCAL"

-- 
debian-live/autotesting



More information about the debian-live-changes mailing list