2026-03-12 14:41:33 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
|
|
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
2026-03-12 20:07:39 +00:00
|
|
|
RESULT="${1:-"${REPO_ROOT}/infra/vm/weft-vm-result"}"
|
2026-03-12 14:41:33 +00:00
|
|
|
|
2026-03-12 20:07:39 +00:00
|
|
|
if [ ! -e "$RESULT" ]; then
|
|
|
|
|
echo "error: $RESULT not found; run infra/vm/build.sh first" >&2
|
2026-03-12 14:41:33 +00:00
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
2026-03-12 20:07:39 +00:00
|
|
|
VM_SCRIPT="${RESULT}/bin/run-weft-vm-vm"
|
|
|
|
|
if [ ! -x "$VM_SCRIPT" ]; then
|
|
|
|
|
echo "error: VM script not found at $VM_SCRIPT" >&2
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
2026-03-12 14:41:33 +00:00
|
|
|
|
2026-03-12 20:07:39 +00:00
|
|
|
exec "$VM_SCRIPT" "$@"
|