summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-07-12 19:20:36 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-07-12 19:20:36 (GMT)
commit1e7411cce77b5f32b2f3fb6354de718f87f51b5d (patch)
treecb1155fe1619459d36d973ce372f24bb4a877513 /scripts
parentd979c033f571d275aed703114dd8a9030912aad2 (diff)
Test for curl or wget only once, not at each download.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/functions b/scripts/functions
index aedb436..c47ee90 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -297,11 +297,11 @@ CT_DoGetFileCurl() {
curl --ftp-pasv -O --retry 3 "$1" >/dev/null || curl -O --retry 3 "$1" >/dev/null || true
}
+_wget=`CT_Which wget`
+_curl=`CT_Which curl`
# Wrapper function to call one of curl or wget
# Usage: CT_DoGetFile <URL>
CT_DoGetFile() {
- local _wget=`CT_Which wget`
- local _curl=`CT_Which curl`
case "${_wget},${_curl}" in
,) CT_DoError "Could find neither wget nor curl";;
,*) CT_DoGetFileCurl "$1" 2>&1 |CT_DoLog ALL;;