From a8e90e1e85a0f1998ed538c0c46a75dbb8cf0a27 Mon Sep 17 00:00:00 2001 From: Ivan Krutov Date: Sat, 23 Sep 2023 18:48:06 +0300 Subject: [PATCH] Overwriting extracted file location --- ci/extract.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ci/extract.sh b/ci/extract.sh index 514c321..cbd288d 100755 --- a/ci/extract.sh +++ b/ci/extract.sh @@ -5,15 +5,14 @@ VERSION=$1 mkdir -p dist cd dist -for osArch in "linux/amd64" "darwin/amd64" "darwin/arm64" "windows/amd64"; do +for osArch in "linux_amd64" "darwin_amd64" "darwin_arm64" "windows_amd64"; do os=$(echo "$osArch" | awk -F "_" '{print $1;}') - arch=$(echo "$osArch" | awk -F "_" '{print $2;}') zipFile='kubectl-vm_'"$VERSION"'_'"$osArch.zip" downloadURL="https://download.aerokube.com/boot/kubectl-vm/$VERSION/$zipFile" - outputFile='kubectl-vm_'"$os"'_'"$arch" + outputFile="kubectl-vm_$osArch" if [ "$os" == "windows" ]; then outputFile="$outputFile.exe" fi - curl -s "$downloadURL" | zcat >> "$outputFile" + curl -s "$downloadURL" | zcat > "$outputFile" chmod 755 "$outputFile" done