# HG changeset patch # User "Yann E. MORIN" # Date 1184268036 0 # Node ID 0aa95f4eed31244dd99857621c52befb09305660 # Parent ac8b9eeefe80ca42f4ae37d378f3d345f03a086a Test for curl or wget only once, not at each download. diff -r ac8b9eeefe80 -r 0aa95f4eed31 scripts/functions --- a/scripts/functions Thu Jul 12 15:40:50 2007 +0000 +++ b/scripts/functions Thu Jul 12 19:20:36 2007 +0000 @@ -297,11 +297,11 @@ curl --ftp-pasv -O --retry 3 "$1" >/dev/null || curl -O --retry 3 "$1" >/dev/null || true } +_wget=`CT_Which wget` +_curl=`CT_Which curl` # Wrapper function to call one of curl or wget # Usage: CT_DoGetFile CT_DoGetFile() { - local _wget=`CT_Which wget` - local _curl=`CT_Which curl` case "${_wget},${_curl}" in ,) CT_DoError "Could find neither wget nor curl";; ,*) CT_DoGetFileCurl "$1" 2>&1 |CT_DoLog ALL;;