#!/usr/bin/env bash set -euo pipefail # Renders the headless panel PNGs and a sample review PDF for visual verification. # # ./scripts/render-panels.sh [output-directory] # # Builds nothing: run `swift build` (or ./scripts/build-app.sh) first. The output # directory is printed at the end; nothing outside it is touched, and the isolated # model means the real Application Support spool and the real age-limit preference # are never read or written. ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" OUT_DIR="${1:-$(mktemp -d /tmp/redline-panels.XXXXXX)}" BINARY="${ROOT}/.build/Redline.app/Contents/MacOS/Shotdeck" if [[ ! -x "${BINARY}" ]]; then BINARY="${ROOT}/.build/debug/Shotdeck" fi if [[ ! -x "${BINARY}" ]]; then echo "No Shotdeck binary found. Run swift build or ./scripts/build-app.sh first." >&2 exit 1 fi mkdir -p "${OUT_DIR}" SHOTDECK_SNAPSHOT_DIR="${OUT_DIR}" "${BINARY}" echo "Panels written to ${OUT_DIR}"