blob: 62e145307edcb7dd717016626403115ccc3cde8b [file] [log] [blame]
Dan McGregorfeaee262016-11-29 07:41:27 -06001#!/usr/bin/env bash
Dave Borowitz3aeefe32015-12-03 13:43:16 -05002# Copyright (C) 2015 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Edwin Kempin7c6d5cd2021-08-09 10:22:41 +020016bazel_bin=$(which bazelisk 2>/dev/null)
17if [[ -z "$bazel_bin" ]]; then
18 echo "Warning: bazelisk is not installed; falling back to bazel."
19 bazel_bin=bazel
20fi
21
Dave Borowitz3aeefe32015-12-03 13:43:16 -050022set -eu
Logan Hanks784849c2018-09-12 14:35:10 -070023SCRIPTNAME=$(mktemp)
24trap "{ rm -f $SCRIPTNAME; }" EXIT
Edwin Kempin7c6d5cd2021-08-09 10:22:41 +020025${bazel_bin} run --script_path="$SCRIPTNAME" //polygerrit-ui:devserver
Logan Hanks784849c2018-09-12 14:35:10 -070026"$SCRIPTNAME" "$@"