#!/bin/zsh set -euo pipefail INTOHOLE_ROOT="${0:A:h:h}" cd "$INTOHOLE_ROOT" export PYTHONDONTWRITEBYTECODE=1 case "${1:-workshop}" in -h|--help) print 'Usage: ./scripts/run.zsh [workshop|showcase|underpass|playtest|merge|doctor|build|test|test-underpass|capture|baseline-build|baseline-test]' exit 0 ;; esac INTOHOLE_ACTION="${1:-workshop}" if (( $# )); then shift; fi INTOHOLE_PYTHON="$INTOHOLE_ROOT/.venv/bin/python" if [[ ! -x "$INTOHOLE_PYTHON" ]]; then print -u2 'Project Python environment missing. Run uv sync in the project root.' exit 1 fi case "$INTOHOLE_ACTION" in playtest) exec "$INTOHOLE_PYTHON" scripts/python/baseline.py play "$@" ;; merge|doctor) exec "$INTOHOLE_PYTHON" scripts/python/baseline.py "$INTOHOLE_ACTION" "$@" ;; baseline-build) exec "$INTOHOLE_PYTHON" scripts/python/baseline.py build "$@" ;; baseline-test) exec "$INTOHOLE_PYTHON" scripts/python/baseline.py test "$@" ;; workshop|showcase|underpass|build|test|test-underpass|capture) exec "$INTOHOLE_PYTHON" scripts/python/studio.py "$INTOHOLE_ACTION" "$@" ;; *) print -u2 "Unknown action: $INTOHOLE_ACTION"; exit 2 ;; esac