From 1e7411cce77b5f32b2f3fb6354de718f87f51b5d Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Thu, 12 Jul 2007 19:20:36 +0000 Subject: Test for curl or wget only once, not at each download. --- scripts/functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/functions b/scripts/functions index aedb4369..c47ee90d 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 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;; -- cgit v1.2.3