NEW 490e2771d live for mosaic-stack, activation 20261020T075800Z-490e2771d3d0, store 3i. W0-W10 pass;
stops at W9 (assistant idle stop, mos-0948) and S2b/B (old chief end rows in the backup, mos-0950).
17 lines
970 B
Bash
Executable File
17 lines
970 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Window rows 177-185 step wrapper: w.sh FILE TITLE CMD... runs CMD in REPO under a clean env (no ANTHROPIC_*, CLAUDE_*,
|
|
# MOSAIC_* or pi variables), appends the title, command, output, exit code and date -u stamps to window/FILE,
|
|
# prints the output, and exits with CMD's exit code.
|
|
set -uo pipefail
|
|
W=/mnt/storage/src/mosaic-stack/agents/darkwing/work/window-rows-177-185
|
|
f="$W/$1"; title="$2"; shift 2
|
|
E=(env -i HOME="$HOME" PATH="$HOME/.local/bin:/usr/local/bin:/usr/bin:/bin" LANG=C.UTF-8
|
|
XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" DBUS_SESSION_BUS_ADDRESS="${DBUS_SESSION_BUS_ADDRESS:-unix:path=$XDG_RUNTIME_DIR/bus}")
|
|
t0=$(date -u +%FT%T.%3NZ)
|
|
{ echo; echo "## $title"; echo "# start $t0"; echo "# command: (cd \$REPO && <clean env> $*)"; } >> "$f"
|
|
out=$(cd /mnt/storage/src/mosaic-stack && "${E[@]}" "$@" 2>&1); rc=$?
|
|
printf '%s\n' "$out" >> "$f"
|
|
echo "# exit $rc, end $(date -u +%FT%T.%3NZ)" >> "$f"
|
|
printf '%s\n# exit %s\n' "$out" "$rc"
|
|
exit $rc
|