scripts: check if running from original checkout

Change-Id: I42e6b9e38a86a05c8ddbd2716ed2bd4d1db59331
Reviewed-on: https://review.monogon.dev/c/monogon/+/217
Reviewed-by: Sergiusz Bazanski <serge@nexantic.com>
diff --git a/scripts/run_in_container.sh b/scripts/run_in_container.sh
index 11a905e..b2d0e3d 100755
--- a/scripts/run_in_container.sh
+++ b/scripts/run_in_container.sh
@@ -1,4 +1,9 @@
 #!/usr/bin/env bash
 set -euo pipefail
 
+if [[ "$(podman inspect monogon-dev --format "{{ (index .Mounts 0).Source }}")" != "$(pwd)" ]]; then
+    echo "Please run this wrapper from the original checkout"
+    exit 1
+fi
+
 podman exec -it monogon-dev $@