1
Fork 0

check arch when downloading bazel

nix
Motiejus Jakštys 2021-07-21 16:23:57 +03:00
parent 37953e9cd3
commit 1c86c6e5c7
1 changed files with 3 additions and 1 deletions

4
.envrc
View File

@ -1,8 +1,10 @@
export PATH="$(git rev-parse --show-toplevel)/bin:$PATH"
arch=$(uname | tr A-Z a-z)
if [[ ! -x bin/bazel ]]; then
mkdir -p bin
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.9.0/bazelisk-linux-amd64 \
wget "https://github.com/bazelbuild/bazelisk/releases/download/v1.9.0/bazelisk-$(arch)-amd64" \
-O bin/bazel
chmod a+x bin/bazel
fi