From cf1ed11277333cdaa09e2d36aa0555db0d79065e Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Wed, 26 Apr 2023 16:10:07 -0500 Subject: [PATCH] add a script to transparently download Buck --- script/buck2 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 script/buck2 diff --git a/script/buck2 b/script/buck2 new file mode 100755 index 00000000..2f00466d --- /dev/null +++ b/script/buck2 @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +if ! test -d buck-out; then + mkdir buck-out +fi + +if ! test -f buck-out/buck2; then + # TODO: adjust download location for different os/arch combinations + curl -L https://github.com/facebook/buck2/releases/download/latest/buck2-aarch64-apple-darwin.zst | zstd -d > buck-out/buck2 + chmod +x buck-out/buck2 +fi + +exec buck-out/buck2 $@