blob: ae6fc859cd6b0e1a0a278e2f4af7dc71ed8a8177 [file] [log] [blame] [edit]
#!/bin/bash
set -o errexit -o nounset -o pipefail
if [ "$TARGETARCH" = "amd64" ]; then
TARGETARCH="x86_64"
fi
curl \
--fail \
--location \
--remote-name \
"https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-${TARGETARCH}"
curl \
--fail \
--location \
"https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-linux-${TARGETARCH}.sha256" \
| sha256sum --check
mv "bazel-${BAZEL_VERSION}-linux-${TARGETARCH}" bazel
chmod +x bazel