Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify install to get arm64 packages when appropriate #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ install_crictl() {
local install_type=$1
local version=$2
local install_path=$3
local platform="$(uname | tr '[:upper:]' '[:lower:]')-amd64"
local arch="$(uname -m)"
local platform="$(uname | tr '[:upper:]' '[:lower:]')-$(get_platform_code $arch)"
local bin_install_path="$install_path/bin"
local binary_path="$bin_install_path/crictl"
local download_url=$(get_download_url $version $platform)
Expand Down Expand Up @@ -46,4 +47,14 @@ get_download_url() {
echo "https://github.com/kubernetes-sigs/cri-tools/releases/download/v${version}/${filename}"
}

# This can be extended for all architectures shown here https://github.com/kubernetes-sigs/cri-tools/releases
get_platform_code() {
case $1 in
'arm64') echo 'arm64';;
'aarch64') echo 'arm64';;
'amd64') echo 'amd64';;
'x86_64') echo 'amd64';;
esac
}

install_crictl $ASDF_INSTALL_TYPE $ASDF_INSTALL_VERSION $ASDF_INSTALL_PATH