[PATCH 1 of 1] scrips/functions: fix downloads using curl
Richard Strand
richard.strand@icomera.com
Sun Jan 10 15:33:00 GMT 2010
# HG changeset patch
# User Richard Strand <richard.strand@icomera.com>
# Date 1263136765 0
# Node ID c4d713e87503f1c3c536e9a836c5cc5cc66f33d5
# Parent 5d693a13c84abf6a00275dfb1413834056e000c0
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>
diff -r 5d693a13c84a -r c4d713e87503 scripts/functions
--- a/scripts/functions Fri Jan 08 18:48:21 2010 +0000
+++ 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
}
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list