run-nightly.sh
Language Shell886 B20 lines
#!/bin/bash# Nightly better-memory run: the path gate, then the optional content gate.# set -e matters: if gate.py fails (including its self-check refusing to run# because a wall is not blocking), the content gate never runs on a half-built# staging directory, and the log shows why.set -euo pipefailHERE="$(cd "$(dirname "$0")" && pwd)"# Colon-separated LIVE vault roots (never a mirror or a swept copy).export VAULT_ROOTS="${VAULT_ROOTS:-$HOME/Documents/vaults/workbench:$HOME/Documents/vaults/identity}"# The staging ROOT: gate.py writes staging/ and .manifest.json under it.export STAGING_DIR="${STAGING_DIR:-$HOME/cowork-staging}"/usr/bin/python3 "$HERE/gate.py"# Optional second wall. Delete these lines to run the path gate alone.export BM_STAGING_DIR="$STAGING_DIR/staging"export BM_GATE_MODE="${BM_GATE_MODE:-remove}"/usr/bin/python3 "$HERE/content_gate.py"