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

Refactor release_name function to be more resilient detecting architecture on macOS [#350] #351

Closed
Closed
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
23 changes: 9 additions & 14 deletions install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,15 @@ release_name() {
case "${os_name}" in
Darwin)
name="${name}-osx"
arch="$(echo $os_info | rev | cut -d ' ' -f1 | rev)"

case "${arch}" in
arm64)
name="${name}-arm64"
;;
x86_64)
name="${name}-x64"
;;
*)
error "Unsupported architecture '${arch}', unable to download a release"
exit 1
;;
esac
# check if os_info contains arm64 or x86_64
if echo $os_info | grep -q arm64; then
name="${name}-arm64"
elif echo $os_info | grep -q x86_64; then
name="${name}-x64"
else
error "Unsupported architecture '${arch}', unable to download a release"
exit 1
fi
;;
*)
error "Unsupported OS '${os_name}', unable to download a release"
Expand Down
Loading