download the right binary on Intel macs

This commit is contained in:
Brian Hicks 2023-05-01 13:37:05 -05:00
parent 10f98deaa4
commit 9ebb74f15e
No known key found for this signature in database
GPG Key ID: C4F324B9CAAB0D50

View File

@ -9,8 +9,20 @@ fi
if ! test -f buck-out/buck2; then
case "$(uname -s)" in
Darwin)
# TODO: adjust for processor type
curl -L https://github.com/facebook/buck2/releases/download/latest/buck2-aarch64-apple-darwin.zst | zstd -d > buck-out/buck2
case "$(arch)" in
arm64)
curl -L https://github.com/facebook/buck2/releases/download/latest/buck2-aarch64-apple-darwin.zst | zstd -d > buck-out/buck2
;;
i386)
curl -L https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-apple-darwin.zst | zstd -d > buck-out/buck2
;;
*)
echo "I don't know how to get a download for $(arch) on macOS"
exit 1
;;
esac
;;
Linux)