From 6e33f37aeec9450866cb354b9c8bfa27c0c15af8 Mon Sep 17 00:00:00 2001 From: Hollow Man Date: Thu, 20 Apr 2023 13:05:51 +0300 Subject: [PATCH] Update installation script Signed-off-by: Hollow Man --- install.ps1 | 2 +- install.sh | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/install.ps1 b/install.ps1 index 342a671d..e2916fc1 100644 --- a/install.ps1 +++ b/install.ps1 @@ -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 diff --git a/install.sh b/install.sh index 48295ab3..adb994cb 100755 --- a/install.sh +++ b/install.sh @@ -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