1.1 --- a/scripts/functions Fri Aug 26 00:07:51 2011 +0200
1.2 +++ b/scripts/functions Fri Sep 09 15:34:04 2011 +0200
1.3 @@ -444,12 +444,6 @@
1.4 local url="${1}"
1.5 local dest="${CT_TARBALLS_DIR}/${url##*/}"
1.6 local tmp="${dest}.tmp-dl"
1.7 - # OK, just look if we have them...
1.8 - # We are sure at least one is available, ./configure checked for it.
1.9 - local _curl=$(CT_Which curl)
1.10 - local _wget=$(CT_Which wget)
1.11 - _curl="${_curl:-false}"
1.12 - _wget="${_wget:-false}"
1.13
1.14 # Remove potential left-over from a previous run
1.15 rm -f "${tmp}"
1.16 @@ -462,13 +456,11 @@
1.17 # continue the downloads. It's far better to simply overwrite the
1.18 # destination file.
1.19 # Some company networks have firewalls to connect to the internet, but it's
1.20 - # not easy to detect them, and wget does not timeout by default while
1.21 - # connecting, so force a global ${CT_CONNECT_TIMEOUT}-second timeout.
1.22 + # not easy to detect them, so force a global ${CT_CONNECT_TIMEOUT}-second
1.23 + # timeout.
1.24 # For curl, no good progress indicator is available. So, be silent.
1.25 - if CT_DoExecLog ALL "${_curl}" --ftp-pasv --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "${url}" \
1.26 - || CT_DoExecLog ALL "${_curl}" --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "${url}" \
1.27 - || CT_DoExecLog ALL "${_wget}" --passive-ftp --tries=3 -T ${CT_CONNECT_TIMEOUT} -nc --progress=dot:binary -O "${tmp}" "${url}" \
1.28 - || CT_DoExecLog ALL "${_wget}" --tries=3 -T ${CT_CONNECT_TIMEOUT} -nc --progress=dot:binary -O "${tmp}" "${url}" \
1.29 + if CT_DoExecLog ALL curl --ftp-pasv --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "${url}" \
1.30 + || CT_DoExecLog ALL curl --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "${url}" \
1.31 ; then
1.32 # One of them succeeded, good!
1.33 mv "${tmp}" "${dest}"