Skip to content

Commit 0b2c844

Browse files
Update install
1 parent b72f638 commit 0b2c844

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

bin/install

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,21 @@ EOS
7373
get_download_url_for_version() {
7474
local version=$1
7575

76-
# if version is a release number, prepend OTP-
77-
if [[ "$version" =~ ^[0-9]+\.* ]]; then
78-
version="OTP-${version}"
79-
fi
80-
81-
echo "https://github.com/erlef/otp_builds/releases/download/${version}/otp-aarch64-apple-darwin.tar.gz"
76+
case "${version}" in
77+
master|maint*)
78+
ref="${version}-latest"
79+
;;
80+
*)
81+
ref="OTP-${otp_version}"
82+
;;
83+
esac
84+
85+
case $(uname -m) in
86+
"x86_64") arch=x86_64 ;;
87+
"arm64") arch=aarch64 ;;
88+
esac
89+
90+
echo "https://github.com/erlef/otp_builds/releases/download/${ref}/otp-${arch}-apple-darwin.tar.gz"
8291
}
8392

8493

0 commit comments

Comments
 (0)