summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorCody Schafer <dev@codyps.com>2014-05-10 02:07:02 (GMT)
committerCody Schafer <dev@codyps.com>2014-05-10 02:07:02 (GMT)
commit490ec212173574c6253bf906a92dd2f15dd1f591 (patch)
tree9bc469a9fafa2d4ae1427ad2e9a1e77656cb4477 /scripts/functions
parent5fb6e6ddf8c4ce491a00fa8ca22b8780e05bdcb3 (diff)
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 <dev@codyps.com> Message-Id: <cb33f8c2cbaf802d4f04.1399687632@localhost> Patchwork-Id: 347582
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/functions b/scripts/functions
index 13764a4..aaf23ee 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