Skip to content

Commit

Permalink
Overwriting extracted file location
Browse files Browse the repository at this point in the history
  • Loading branch information
vania-pooh committed Sep 23, 2023
1 parent b810f2e commit a8e90e1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ci/extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a8e90e1

Please sign in to comment.