From 490ec212173574c6253bf906a92dd2f15dd1f591 Mon Sep 17 00:00:00 2001 From: Cody Schafer Date: Fri, 9 May 2014 19:07:02 -0700 Subject: scripts: add possibility to not override default connection timeout Allow '-1' to be specified as CONNECTION_TIMEOUT to disable the use of the connection timeout for wget. Signed-off-by: Cody P Schafer Message-Id: Patchwork-Id: 347582 --- scripts/functions | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts/functions') 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 -- cgit v1.2.3