diff -r ea45530f42c1 -r ded91847b3b5 scripts/functions --- a/scripts/functions Sun Mar 08 11:14:54 2009 +0000 +++ b/scripts/functions Fri Mar 13 10:34:53 2009 +0000 @@ -112,7 +112,7 @@ } # Execute an action, and log its messages -# Usage: CT_DoExecLog <[VAR=val...] command [parameters...]> +# Usage: [VAR=val...] CT_DoExecLog CT_DoExecLog() { local level="$1" shift @@ -399,8 +399,8 @@ # Some company networks have firewalls to connect to the internet, but it's # not easy to detect them, and wget does not timeout by default while # connecting, so force a global ${CT_CONNECT_TIMEOUT}-second timeout. - wget -T ${CT_CONNECT_TIMEOUT} -nc --progress=dot:binary --tries=3 --passive-ftp "$1" \ - || wget -T ${CT_CONNECT_TIMEOUT} -nc --progress=dot:binary --tries=3 "$1" \ + CT_DoExecLog ALL wget -T ${CT_CONNECT_TIMEOUT} -nc --progress=dot:binary --tries=3 --passive-ftp "$1" \ + || CT_DoExecLog ALL wget -T ${CT_CONNECT_TIMEOUT} -nc --progress=dot:binary --tries=3 "$1" \ || true } @@ -409,9 +409,9 @@ CT_DoGetFileCurl() { # Note: comments about wget method (above) are also valid here # Plus: no good progress indicator is available with curl, - # so output is consigned to oblivion - curl --ftp-pasv -O --retry 3 "$1" --connect-timeout ${CT_CONNECT_TIMEOUT} >/dev/null \ - || curl -O --retry 3 "$1" --connect-timeout ${CT_CONNECT_TIMEOUT} >/dev/null \ + # so, be silent. + CT_DoExecLog ALL curl -s --ftp-pasv -O --retry 3 "$1" --connect-timeout ${CT_CONNECT_TIMEOUT} \ + || CT_DoExecLog ALL curl -s -O --retry 3 "$1" --connect-timeout ${CT_CONNECT_TIMEOUT} \ || true } @@ -422,8 +422,8 @@ CT_DoGetFile() { case "${_wget},${_curl}" in ,) CT_Abort "Could find neither wget nor curl";; - ,*) CT_DoExecLog ALL CT_DoGetFileCurl "$1" 2>&1;; - *) CT_DoExecLog ALL CT_DoGetFileWget "$1" 2>&1;; + ,*) CT_DoGetFileCurl "$1";; + *) CT_DoGetFileWget "$1";; esac }