From 955a20ff277fdf60ca86e935e54480d57c07a7eb Mon Sep 17 00:00:00 2001 From: Milos Subotic Date: Wed, 29 May 2024 11:22:50 +0200 Subject: [PATCH] Added tmp file for wget in getFile() as it is used in downloadFile(). Now install.sh works with wget as download tool. --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 2f74a65295e..6843c144498 100755 --- a/install.sh +++ b/install.sh @@ -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"