# HG changeset patch # User Richard Strand # Date 1263136765 0 # Node ID 3995b34ba925439e4bb52ba9697b57d2dd226be3 # Parent 5c0d326c2ceab4517fb3d760c31713bb619cf772 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 -r 5c0d326c2cea -r 3995b34ba925 scripts/functions --- a/scripts/functions Sat Jan 09 16:05:01 2010 +0100 +++ b/scripts/functions Sun Jan 10 15:19:25 2010 +0000 @@ -343,8 +343,8 @@ # 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 }