| Serge Bazanski | e7bb94c | 2021-07-02 17:11:58 +0200 | [diff] [blame] | 1 | #!/usr/bin/env bash | 
|  | 2 | set -euo pipefail | 
|  | 3 |  | 
| Leopold Schabel | 6767e05 | 2021-08-02 17:48:35 +0200 | [diff] [blame] | 4 | if ! podman inspect monogon-dev --format ":{{ range .Mounts }}{{.Source }}:{{ end }}" | grep -q ":$(pwd):"; then | 
| Leopold Schabel | 3cb0f4b | 2021-07-19 15:22:07 +0200 | [diff] [blame] | 5 | echo "Please run this wrapper from the original checkout" | 
|  | 6 | exit 1 | 
|  | 7 | fi | 
|  | 8 |  | 
| Serge Bazanski | e7bb94c | 2021-07-02 17:11:58 +0200 | [diff] [blame] | 9 | # ibazel doesn't take a --output_user_root, set it using the per-user .bazelrc inside the container. | 
|  | 10 | podman exec -i monogon-dev bash -c "cat - > /user/.bazelrc" <<EOF | 
|  | 11 | startup --output_user_root ${HOME}/.cache/bazel-monogon | 
|  | 12 | EOF | 
|  | 13 |  | 
|  | 14 | exec podman exec -it monogon-dev ibazel "$@" |