diff options
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/functions b/scripts/functions index 33a23a25..8d318724 100644 --- a/scripts/functions +++ b/scripts/functions @@ -353,11 +353,13 @@ _curl=$(CT_Which curl) # Wrapper function to call one of curl or wget # Usage: CT_DoGetFile <URL> CT_DoGetFile() { - case "${_wget},${_curl}" in - ,) CT_Abort "Could find neither wget nor curl";; - ,*) CT_DoGetFileCurl "$1";; - *) CT_DoGetFileWget "$1";; - esac + if [ -n "${_curl}" ]; then + CT_DoGetFileCurl "$1" + elif [ -n "${_wget}" ]; then + CT_DoGetFileWget "$1" + else + CT_Abort "Could find neither wget nor curl" + fi } # This function tries to retrieve a tarball form a local directory |