diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-09-09 15:48:59 +0200 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-09-09 15:48:59 +0200 |
commit | 77436f025f7e0b494a81d257fb8d7ce62858c3be (patch) | |
tree | b18d7484fa67e1a0eab5c560f4b82c596c630da3 /scripts/functions | |
parent | 4b0155c24fb8c27aa19bbb9ab136d256e9efc2b3 (diff) | |
download | crosstool-ng-77436f025f7e0b494a81d257fb8d7ce62858c3be.tar.gz crosstool-ng-77436f025f7e0b494a81d257fb8d7ce62858c3be.tar.bz2 crosstool-ng-77436f025f7e0b494a81d257fb8d7ce62858c3be.zip |
scripts/functions: only use passive FTP
Virtually all FTP server available on-line support passive FTP.
At least, this is the case for the servers crosstool-NG needs to
connect to.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/scripts/functions b/scripts/functions index eb245bd0..bd74634f 100644 --- a/scripts/functions +++ b/scripts/functions @@ -448,8 +448,6 @@ CT_DoGetFile() { # Remove potential left-over from a previous run rm -f "${tmp}" - # Some (very old!) FTP server might not support the passive mode, thus - # retry without. # We also retry a few times, in case there is a transient error (eg. behind # a dynamic IP that changes during the transfer...) # With automated download as we are doing, it can be very dangerous to @@ -459,10 +457,14 @@ CT_DoGetFile() { # not easy to detect them, so force a global ${CT_CONNECT_TIMEOUT}-second # timeout. # For curl, no good progress indicator is available. So, be silent. - if CT_DoExecLog ALL curl --ftp-pasv --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "${url}" \ - || CT_DoExecLog ALL curl --retry 3 --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f -s -o "${tmp}" "${url}" \ - ; then - # One of them succeeded, good! + if CT_DoExecLog ALL curl --ftp-pasv \ + --retry 3 \ + --connect-timeout ${CT_CONNECT_TIMEOUT} \ + --location --fail --silent \ + --output "${tmp}" \ + "${url}" + then + # Success, we got it, good! mv "${tmp}" "${dest}" else # Woops... |