Add --location parameter in Curl mode to handle redirect
This commit is contained in:
parent
91ad601bc0
commit
6d9a8089e7
1 changed files with 2 additions and 2 deletions
|
@ -126,7 +126,7 @@ do
|
||||||
tmpfile=`mktemp`
|
tmpfile=`mktemp`
|
||||||
if [ $CURL -eq 1 ]
|
if [ $CURL -eq 1 ]
|
||||||
then
|
then
|
||||||
curl $CURL_OPTS --silent --output $tmpfile $CHECK_URL
|
curl $CURL_OPTS --location --silent --output $tmpfile $CHECK_URL
|
||||||
else
|
else
|
||||||
wget $WGET_OPTS $WGET_SSL_OPT -q $CHECK_URL -O $tmpfile
|
wget $WGET_OPTS $WGET_SSL_OPT -q $CHECK_URL -O $tmpfile
|
||||||
fi
|
fi
|
||||||
|
@ -202,7 +202,7 @@ then
|
||||||
[ $DEBUG -eq 1 ] && echo "Download new release in $DOWNLOAD_FILE"
|
[ $DEBUG -eq 1 ] && echo "Download new release in $DOWNLOAD_FILE"
|
||||||
if [ $CURL -eq 1 ]
|
if [ $CURL -eq 1 ]
|
||||||
then
|
then
|
||||||
curl $CURL_OPTS --silent --output $DOWNLOAD_FILE $DOWNLOAD_URL
|
curl $CURL_OPTS --location --silent --output $DOWNLOAD_FILE $DOWNLOAD_URL
|
||||||
else
|
else
|
||||||
wget $WGET_OPTS $WGET_SSL_OPT -q -O "$DOWNLOAD_FILE" "$DOWNLOAD_URL"
|
wget $WGET_OPTS $WGET_SSL_OPT -q -O "$DOWNLOAD_FILE" "$DOWNLOAD_URL"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue