From 3dfeb93ea2257cdc33bf522c89934a090f36a4f2 Mon Sep 17 00:00:00 2001 From: Arthur Rahmangulov Date: Fri, 4 Oct 2024 09:24:01 +0400 Subject: [PATCH 1/3] Fixes missing '.exe' extension on Windows platforms during plugin installation --- hack/install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hack/install.sh b/hack/install.sh index 4cd8d1da..452cc8c1 100755 --- a/hack/install.sh +++ b/hack/install.sh @@ -34,10 +34,11 @@ initArch() { initOS() { os=$(uname -s) + binary_extension="" case "$(uname)" in Darwin) os="darwin" ;; Linux) os="linux" ;; - CYGWIN*|MINGW*|MSYS_NT*) os="windows" ;; + CYGWIN*|MINGW*|MSYS_NT*) os="windows"; binary_extension=".exe" ;; *) echo "OS '$(uname)' not supported!" >&2 exit 1 @@ -96,4 +97,4 @@ checksums_filename="releases/v${version}_checksums.txt" ) # Unpack the binary. -tar xzf "${binary_filename}" bin/helm-s3 +tar xzf "${binary_filename}" "bin/helm-s3${binary_extension}" From 339d1960c4706886e643bc77324f6f788047083d Mon Sep 17 00:00:00 2001 From: Arthur Rahmangulov Date: Sat, 5 Oct 2024 20:41:41 +0400 Subject: [PATCH 2/3] Applies 4-spaces indentation --- hack/install.sh | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/hack/install.sh b/hack/install.sh index 452cc8c1..3451d1a2 100755 --- a/hack/install.sh +++ b/hack/install.sh @@ -20,30 +20,29 @@ validate_checksum() { } initArch() { - arch=$(uname -m) - case $arch in - x86_64|amd64) arch="amd64" ;; - aarch64|arm64) arch="arm64" ;; - *) - echo "Arch '$(uname -m)' not supported!" >&2 - exit 1 - ;; - esac - + arch=$(uname -m) + case $arch in + x86_64|amd64) arch="amd64" ;; + aarch64|arm64) arch="arm64" ;; + *) + echo "Arch '$(uname -m)' not supported!" >&2 + exit 1 + ;; + esac } initOS() { - os=$(uname -s) - binary_extension="" - case "$(uname)" in - Darwin) os="darwin" ;; - Linux) os="linux" ;; - CYGWIN*|MINGW*|MSYS_NT*) os="windows"; binary_extension=".exe" ;; - *) - echo "OS '$(uname)' not supported!" >&2 - exit 1 - ;; - esac + os=$(uname -s) + binary_extension="" + case "$(uname)" in + Darwin) os="darwin" ;; + Linux) os="linux" ;; + CYGWIN*|MINGW*|MSYS_NT*) os="windows"; binary_extension=".exe" ;; + *) + echo "OS '$(uname)' not supported!" >&2 + exit 1 + ;; + esac } on_exit() { From f12a5eef52b3e42b1997dc15627564cce3c10c28 Mon Sep 17 00:00:00 2001 From: Arthur Rahmangulov Date: Sat, 5 Oct 2024 20:42:45 +0400 Subject: [PATCH 3/3] Fixes 'os' variable usage within initOS func. --- hack/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/install.sh b/hack/install.sh index 3451d1a2..f140c735 100755 --- a/hack/install.sh +++ b/hack/install.sh @@ -34,12 +34,12 @@ initArch() { initOS() { os=$(uname -s) binary_extension="" - case "$(uname)" in + case "$(os)" in Darwin) os="darwin" ;; Linux) os="linux" ;; CYGWIN*|MINGW*|MSYS_NT*) os="windows"; binary_extension=".exe" ;; *) - echo "OS '$(uname)' not supported!" >&2 + echo "OS '$(os)' not supported!" >&2 exit 1 ;; esac