From 185ea5a640bf675fcf5157e67dc323927453773a Mon Sep 17 00:00:00 2001 From: Richard Strand Date: Sun, 10 Jan 2010 15:19:25 +0000 Subject: 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 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 } -- cgit v0.10.2-6-g49f6