mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-09-17 10:17:09 +03:00
42 lines
972 B
Bash
Executable File
42 lines
972 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
cd $(git rev-parse --show-toplevel)
|
|
|
|
if ! test -d buck-out; then
|
|
mkdir buck-out
|
|
fi
|
|
|
|
if ! test -f buck-out/buck2; then
|
|
case "$(uname -s)" in
|
|
Darwin)
|
|
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)
|
|
curl -L https://github.com/facebook/buck2/releases/download/latest/buck2-x86_64-unknown-linux-gnu.zst | zstd -d > buck-out/buck2
|
|
;;
|
|
|
|
*)
|
|
echo "I don't know how to get a download for $(uname -s)"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
chmod +x buck-out/buck2
|
|
fi
|
|
|
|
exec buck-out/buck2 $@
|