scripts/functions
changeset 1668 383c37e754df
parent 1630 1409ba438ea1
child 1669 61edd9d19e3c
     1.1 --- a/scripts/functions	Mon Nov 16 20:15:45 2009 +0100
     1.2 +++ b/scripts/functions	Tue Dec 29 22:11:09 2009 +0100
     1.3 @@ -353,11 +353,13 @@
     1.4  # Wrapper function to call one of curl or wget
     1.5  # Usage: CT_DoGetFile <URL>
     1.6  CT_DoGetFile() {
     1.7 -    case "${_wget},${_curl}" in
     1.8 -        ,)  CT_Abort "Could find neither wget nor curl";;
     1.9 -        ,*) CT_DoGetFileCurl "$1";;
    1.10 -        *)  CT_DoGetFileWget "$1";;
    1.11 -    esac
    1.12 +    if   [ -n "${_curl}" ]; then
    1.13 +        CT_DoGetFileCurl "$1"
    1.14 +    elif [ -n "${_wget}" ]; then
    1.15 +        CT_DoGetFileWget "$1"
    1.16 +    else
    1.17 +        CT_Abort "Could find neither wget nor curl"
    1.18 +    fi
    1.19  }
    1.20  
    1.21  # This function tries to retrieve a tarball form a local directory