install script [skip ci]

This commit is contained in:
Michiel Borkent 2022-06-07 23:12:33 +02:00
parent 3c7468b6de
commit ed0875b52b

16
install
View file

@ -82,15 +82,21 @@ case "$(uname -s)" in
Darwin*) platform=macos;; Darwin*) platform=macos;;
esac esac
case "$(uname -m)" in
aarch64) arch=aarch64;;
*) arch=amd64;;
esac
# Ugly ugly conversion of version to a comparable number # Ugly ugly conversion of version to a comparable number
IFS='.' read -ra VER <<< "${version//-SNAPSHOT/}" IFS='.' read -ra VER <<< "${version//-SNAPSHOT/}"
vernum=$(printf "%03d%03d%03d" "${VER[0]}" "${VER[1]}" "${VER[2]}") vernum=$(printf "%03d%03d%03d" "${VER[0]}" "${VER[1]}" "${VER[2]}")
case "$(uname -m)" in
aarch64) arch=aarch64;;
arm64) if [[ 10#$vernum -le 10#000008002 ]]; then
arch="amd64"
else
arch="aarch64"
fi
;;
*) arch=amd64;;
esac
if [[ 10#$vernum -le 10#000002013 ]]; then if [[ 10#$vernum -le 10#000002013 ]]; then
ext="zip" ext="zip"
util="$(which unzip) -qqo" util="$(which unzip) -qqo"