summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/functions12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/functions b/scripts/functions
index 33a23a2..8d31872 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