Merge pull request #1199 from HollowMan6/install

Update installation script
This commit is contained in:
David Wertenteil
2023-05-01 21:53:16 +03:00
committed by GitHub
2 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
Write-Host "Installing Kubescape..." -ForegroundColor Cyan
$BASE_DIR=$env:USERPROFILE + "\.kubescape"
$packageName = "/kubescape-windows-latest"
$packageName = "/kubescape.exe"
# Get latest release url
$config = Invoke-WebRequest "https://api.github.com/repos/kubescape/kubescape/releases/latest" | ConvertFrom-Json
+11 -1
View File
@@ -28,10 +28,20 @@ else
osName=ubuntu
fi
arch=$(uname -m)
if [[ $arch == *"aarch64"* ]]; then
arch="-arm64"
else
if [[ $arch != *"x86_64"* ]]; then
echo -e "\033[33mArchitecture $arch may be unsupported, will try to install the amd64 one anyway."
fi
arch=""
fi
mkdir -p $BASE_DIR
OUTPUT=$BASE_DIR/$KUBESCAPE_EXEC
DOWNLOAD_URL="https://github.com/kubescape/kubescape/releases/${RELEASE}/kubescape-${osName}-latest"
DOWNLOAD_URL="https://github.com/kubescape/kubescape/releases/${RELEASE}/kubescape${arch}-${osName}-latest"
curl --progress-bar -L $DOWNLOAD_URL -o $OUTPUT