Add --location parameter in Curl mode to handle redirect

This commit is contained in:
Benjamin Renard 2017-04-28 17:11:48 +02:00
parent 91ad601bc0
commit 6d9a8089e7

View file

@ -126,7 +126,7 @@ do
tmpfile=`mktemp`
if [ $CURL -eq 1 ]
then
curl $CURL_OPTS --silent --output $tmpfile $CHECK_URL
curl $CURL_OPTS --location --silent --output $tmpfile $CHECK_URL
else
wget $WGET_OPTS $WGET_SSL_OPT -q $CHECK_URL -O $tmpfile
fi
@ -202,7 +202,7 @@ then
[ $DEBUG -eq 1 ] && echo "Download new release in $DOWNLOAD_FILE"
if [ $CURL -eq 1 ]
then
curl $CURL_OPTS --silent --output $DOWNLOAD_FILE $DOWNLOAD_URL
curl $CURL_OPTS --location --silent --output $DOWNLOAD_FILE $DOWNLOAD_URL
else
wget $WGET_OPTS $WGET_SSL_OPT -q -O "$DOWNLOAD_FILE" "$DOWNLOAD_URL"
fi