blob: f03e57d7a69b3e0199a017671fd7059b4da342d6 [file] [log] [blame]
Serge Bazanskie7bb94c2021-07-02 17:11:58 +02001#!/usr/bin/env bash
2set -euo pipefail
3
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
Serge Bazanskie7bb94c2021-07-02 17:11:58 +02009# ibazel doesn't take a --output_user_root, set it using the per-user .bazelrc inside the container.
10podman exec -i monogon-dev bash -c "cat - > /user/.bazelrc" <<EOF
11startup --output_user_root ${HOME}/.cache/bazel-monogon
12EOF
13
14exec podman exec -it monogon-dev ibazel "$@"