From b0253a9ff555ad71e326e48a6b73fb079511bbec Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Wed, 27 Jul 2016 03:49:19 +0200 Subject: [PATCH] Allow curl to follow redirect (with -L) --- lgsm/functions/core_dl.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 2b1ff8053..2a3c196a5 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -117,11 +117,11 @@ fn_fetch_file(){ if [ ${filename##*.} == "bz2" ]; then echo -ne "downloading ${filename}..." sleep 1 - curlcmd=$(${curlcmd} --progress-bar --fail -o "${filedir}/${filename}" "${fileurl}") + curlcmd=$(${curlcmd} --progress-bar --fail -L -o "${filedir}/${filename}" "${fileurl}") echo -ne "downloading ${filename}..." else echo -ne " fetching ${filename}...\c" - curlcmd=$(${curlcmd} -s --fail -o "${filedir}/${filename}" "${fileurl}" 2>&1) + curlcmd=$(${curlcmd} -s --fail -L -o "${filedir}/${filename}" "${fileurl}" 2>&1) fi local exitcode=$? if [ ${exitcode} -ne 0 ]; then @@ -218,4 +218,4 @@ fn_update_function(){ force="noforce" md5="nomd5" fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" -} \ No newline at end of file +}