Unverified Commit abb2232f authored by Milos Subotic's avatar Milos Subotic Committed by GitHub

fix install.sh not working with wget2

parent 33dfa8e8
......@@ -103,7 +103,8 @@ getFile() {
if [ "$DOWNLOAD_TOOL" = "curl" ]; then
GETFILE_HTTP_STATUS_CODE=$(curl -s -w '%{http_code}' -L "$GETFILE_URL" -o "$GETFILE_FILE_PATH")
elif [ "$DOWNLOAD_TOOL" = "wget" ]; then
wget --server-response --content-on-error -q -O "$GETFILE_FILE_PATH" "$GETFILE_URL"
TMP_FILE=$(mktemp)
wget --server-response --content-on-error -q -O "$GETFILE_FILE_PATH" "$GETFILE_URL" 2>"$TMP_FILE"
GETFILE_HTTP_STATUS_CODE=$(awk '/^ HTTP/{print $2}' "$TMP_FILE")
fi
echo "$GETFILE_HTTP_STATUS_CODE"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment