1.1 --- a/scripts/functions Thu Jun 02 19:50:12 2011 +0200
1.2 +++ b/scripts/functions Thu Jun 02 23:56:13 2011 +0200
1.3 @@ -426,7 +426,8 @@
1.4 # to find the requested URL (think about snapshots, different layouts
1.5 # for different gcc versions, etc...).
1.6 CT_DoGetFile() {
1.7 - local dest="${1}"
1.8 + local url="${1}"
1.9 + local dest="${CT_TARBALLS_DIR}/${url##*/}"
1.10 local tmp="${dest}.tmp-dl"
1.11 # OK, just look if we have them...
1.12 # We are sure at least one is available, ./configure checked for it.
1.13 @@ -449,10 +450,10 @@
1.14 # not easy to detect them, and wget does not timeout by default while
1.15 # connecting, so force a global ${CT_CONNECT_TIMEOUT}-second timeout.
1.16 # For curl, no good progress indicator is available. So, be silent.
1.17 - if CT_DoExecLog ALL "${_curl}" --ftp-pasv --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "$1" \
1.18 - || CT_DoExecLog ALL "${_curl}" --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "$1" \
1.19 - || CT_DoExecLog ALL "${_wget}" --passive-ftp --tries=3 -T ${CT_CONNECT_TIMEOUT} -nc --progress=dot:binary -O "${tmp}" "$1" \
1.20 - || CT_DoExecLog ALL "${_wget}" --tries=3 -T ${CT_CONNECT_TIMEOUT} -nc --progress=dot:binary -O "${tmp}" "$1" \
1.21 + if CT_DoExecLog ALL "${_curl}" --ftp-pasv --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "${url}" \
1.22 + || CT_DoExecLog ALL "${_curl}" --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "${url}" \
1.23 + || CT_DoExecLog ALL "${_wget}" --passive-ftp --tries=3 -T ${CT_CONNECT_TIMEOUT} -nc --progress=dot:binary -O "${tmp}" "${url}" \
1.24 + || CT_DoExecLog ALL "${_wget}" --tries=3 -T ${CT_CONNECT_TIMEOUT} -nc --progress=dot:binary -O "${tmp}" "${url}" \
1.25 ; then
1.26 # One of them succeeded, good!
1.27 mv "${tmp}" "${dest}"