Add --location parameter in Curl mode to handle redirect
Benjamin Renard

Benjamin Renard commited on 2017-04-28 15:11:48
Showing 1 changed files, with 2 additions and 2 deletions.

... ...
@@ -126,7 +126,7 @@ do
126 126
 	tmpfile=`mktemp`
127 127
 	if [ $CURL -eq 1 ]
128 128
 	then
129
-		curl $CURL_OPTS --silent --output $tmpfile $CHECK_URL
129
+		curl $CURL_OPTS --location --silent --output $tmpfile $CHECK_URL
130 130
 	else
131 131
 		wget $WGET_OPTS $WGET_SSL_OPT -q $CHECK_URL -O $tmpfile
132 132
 	fi
... ...
@@ -202,7 +202,7 @@ then
202 202
 			[ $DEBUG -eq 1 ] && echo "Download new release in $DOWNLOAD_FILE"
203 203
 			if [ $CURL -eq 1 ]
204 204
 			then
205
-				curl $CURL_OPTS --silent --output $DOWNLOAD_FILE $DOWNLOAD_URL
205
+				curl $CURL_OPTS --location --silent --output $DOWNLOAD_FILE $DOWNLOAD_URL
206 206
 			else
207 207
 				wget $WGET_OPTS $WGET_SSL_OPT -q -O "$DOWNLOAD_FILE" "$DOWNLOAD_URL"
208 208
 			fi
209 209