Skip to content

Commit

Permalink
fix install.sh not working with wget2
Browse files Browse the repository at this point in the history
  • Loading branch information
MilosSubotic authored Jul 10, 2024
1 parent 33dfa8e commit abb2232
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit abb2232

Please sign in to comment.