blob: 3ba2bb013fc104284f6ca786ffa0eb949c0046f5 [file] [log] [blame]
#!/bin/bash
# Copyright 2022 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
run_bazel() {
local bazel="${REPO_ROOT}/tools/bazel"
if [[ ! -x "${bazel}" ]]; then
>&2 echo -n ""
>&2 echo "Bazel does not exist at ${bazel}. "
>&2 echo -n "Please run the boostrap script [scripts/bootstrap.sh] and try again:"
>&2 echo ""
exit 1
fi
if [[ -z "$OUTPUT_BASE" ]]; then
"${bazel}" "$@"
else
"${bazel}" --output_base="${OUTPUT_BASE}" "$@"
fi
}