diff options
author | Richard Strand <richard.strand@icomera.com> | 2010-01-10 15:19:25 (GMT) |
---|---|---|
committer | Richard Strand <richard.strand@icomera.com> | 2010-01-10 15:19:25 (GMT) |
commit | 185ea5a640bf675fcf5157e67dc323927453773a (patch) | |
tree | 099bc27eae0cfbc060c8fa22117c3f73a874b31d /scripts | |
parent | 261709c8d4b014a40c48c73e778dd9a09a991def (diff) |
scrips/functions: fix downloads using curl
By default curl doesn't folow redirects. This breaks sourceforge downloads.
Add the -L option to curl to fix this.
Curl also downloads the html as a file even when it gets a 404. This breaks
http downloads when using the failback system. Add the -f option to curl to fix
this.
Signed-off-by: Richard Strand <richard.strand@icomera.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/functions | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/functions b/scripts/functions index 4b279ac..57c8aa7 100644 --- a/scripts/functions +++ b/scripts/functions @@ -343,8 +343,8 @@ CT_DoGetFileCurl() { # Note: comments about wget method (above) are also valid here # Plus: no good progress indicator is available with curl, # 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} \ + CT_DoExecLog ALL curl -s --ftp-pasv -O --retry 3 "$1" --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f \ + || CT_DoExecLog ALL curl -s -O --retry 3 "$1" --connect-timeout ${CT_CONNECT_TIMEOUT} -L -f \ || true } |