Skip to content

Commit

Permalink
Merge pull request #5 from ulope/master
Browse files Browse the repository at this point in the history
Fix Linux aarch64
  • Loading branch information
pesterhazy authored Dec 19, 2023
2 parents b6bda6f + 38adfd7 commit 1a3851b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ list_all_versions() {
download_release() {
local version="$1"
local filename="$2"
local arch=""
local platform=""
local static=""

case "$(uname -s)" in
Linux*) platform=linux ;;
Expand All @@ -46,11 +49,15 @@ download_release() {
*) arch=asdf_babashka_unrecognized_arch ;;
esac

if [[ $arch == "aarch64" && $platform == "linux" ]]; then
static="-static"
fi

echo >&2 "* Downloading babashka release $version..."

local ext url
for ext in tar.gz zip; do
url="$GH_REPO/releases/download/v$version/babashka-$version-$platform-$arch.$ext"
url="$GH_REPO/releases/download/v$version/babashka-$version-$platform-$arch$static.$ext"
curl "${curl_opts[@]}" -o "$filename.$ext" -C - "$url" >&/dev/null && echo $ext && return
done

Expand Down

0 comments on commit 1a3851b

Please sign in to comment.