diff options
-rw-r--r-- | config/global/download.in | 2 | ||||
-rw-r--r-- | scripts/functions | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/config/global/download.in b/config/global/download.in index 370d97b8..115eefc5 100644 --- a/config/global/download.in +++ b/config/global/download.in @@ -47,6 +47,8 @@ config CONNECT_TIMEOUT Note that this value applies equally to wget if you have that installed. + If '-1' is specified, no timeout reconfiguration options are passed to wget/curl. + config ONLY_DOWNLOAD bool prompt "Stop after downloading tarballs" diff --git a/scripts/functions b/scripts/functions index 13764a41..aaf23eea 100644 --- a/scripts/functions +++ b/scripts/functions @@ -572,9 +572,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_CONNECT_TIMEOUT} = -1 ]; then + T= + else + T="-T ${CT_CONNECT_TIMEOUT}" + fi if CT_DoExecLog ALL wget --passive-ftp --tries=3 -nc \ --progress=dot:binary \ - -T ${CT_CONNECT_TIMEOUT} \ + ${T} \ -O "${tmp}" \ "${url}" then |