1.1 --- a/scripts/functions Fri Sep 09 15:34:04 2011 +0200
1.2 +++ b/scripts/functions Fri Sep 09 15:48:59 2011 +0200
1.3 @@ -448,8 +448,6 @@
1.4 # Remove potential left-over from a previous run
1.5 rm -f "${tmp}"
1.6
1.7 - # Some (very old!) FTP server might not support the passive mode, thus
1.8 - # retry without.
1.9 # We also retry a few times, in case there is a transient error (eg. behind
1.10 # a dynamic IP that changes during the transfer...)
1.11 # With automated download as we are doing, it can be very dangerous to
1.12 @@ -459,10 +457,14 @@
1.13 # not easy to detect them, so force a global ${CT_CONNECT_TIMEOUT}-second
1.14 # timeout.
1.15 # For curl, no good progress indicator is available. So, be silent.
1.16 - if CT_DoExecLog ALL curl --ftp-pasv --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "${url}" \
1.17 - || CT_DoExecLog ALL curl --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "${url}" \
1.18 - ; then
1.19 - # One of them succeeded, good!
1.20 + if CT_DoExecLog ALL curl --ftp-pasv \
1.21 + --retry 3 \
1.22 + --connect-timeout ${CT_CONNECT_TIMEOUT} \
1.23 + --location --fail --silent \
1.24 + --output "${tmp}" \
1.25 + "${url}"
1.26 + then
1.27 + # Success, we got it, good!
1.28 mv "${tmp}" "${dest}"
1.29 else
1.30 # Woops...