From 2c077d6fac6a21227ddfd4b2403f24a8ad01dda1 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Tue, 29 Dec 2009 22:11:09 +0100 Subject: scripts/functions: simplify wget vs. curl check 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 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 -- cgit v0.10.2-6-g49f6