blob: a39aa640407d5ada1bf85fb2419659d3d3a721e3 [file] [edit]
#!/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.
# Invoked by build.sh.
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
echo $@
if [[ -z "$OUTPUT_BASE" ]]; then
"${bazel}" "$@"
else
"${bazel}" --output_base="${OUTPUT_BASE}" "$@"
fi
}