Test for curl or wget only once, not at each download.
1.1 --- a/scripts/functions Thu Jul 12 15:40:50 2007 +0000
1.2 +++ b/scripts/functions Thu Jul 12 19:20:36 2007 +0000
1.3 @@ -297,11 +297,11 @@
1.4 curl --ftp-pasv -O --retry 3 "$1" >/dev/null || curl -O --retry 3 "$1" >/dev/null || true
1.5 }
1.6
1.7 +_wget=`CT_Which wget`
1.8 +_curl=`CT_Which curl`
1.9 # Wrapper function to call one of curl or wget
1.10 # Usage: CT_DoGetFile <URL>
1.11 CT_DoGetFile() {
1.12 - local _wget=`CT_Which wget`
1.13 - local _curl=`CT_Which curl`
1.14 case "${_wget},${_curl}" in
1.15 ,) CT_DoError "Could find neither wget nor curl";;
1.16 ,*) CT_DoGetFileCurl "$1" 2>&1 |CT_DoLog ALL;;