blob: 091242abbadb024ee23f9bc320c001115cdbf010 [file] [log] [blame]
Leopold Schabeldca59d92021-04-01 19:02:53 +02001#!/usr/bin/env bash
Leopold Schabel2a2081c2019-10-23 13:33:10 +02002set -euo pipefail
Leopold Schabel2983d722019-10-23 12:16:42 +02003
Leopold Schabel6767e052021-08-02 17:48:35 +02004if ! podman inspect monogon-dev --format ":{{ range .Mounts }}{{.Source }}:{{ end }}" | grep -q ":$(pwd):"; then
Leopold Schabel3cb0f4b2021-07-19 15:22:07 +02005 echo "Please run this wrapper from the original checkout"
6 exit 1
7fi
8
Lorenz Bruna8e23542022-03-30 19:57:32 +02009if [ -t 1 ]; then
10 EXTRA_ARGS=-t
11else
12 EXTRA_ARGS=
13fi
14
15exec podman exec -i $EXTRA_ARGS monogon-dev bazel --output_user_root ${HOME}/.cache/bazel-monogon "$@"