Skip to content

Commit

Permalink
Update installation script
Browse files Browse the repository at this point in the history
Signed-off-by: Hollow Man <hollowman@opensuse.org>
  • Loading branch information
HollowMan6 committed Apr 20, 2023
1 parent b017d77 commit 6e33f37
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion install.ps1
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 11 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6e33f37

Please sign in to comment.