#!/bin/bash # Re-render all Graphviz diagrams to SVG. # Run this after each phase when .dot files are updated. # Usage: ./docs.sh set -euo pipefail DOCS_DIR="$(cd "$(dirname "$0")/../docs" && pwd)" if ! command -v dot &>/dev/null; then echo "graphviz not found — install with: sudo apt install graphviz" >&2 exit 1 fi for f in "$DOCS_DIR"/*.dot; do svg="${f%.dot}.svg" echo "==> $(basename "$f") → $(basename "$svg")" dot -Tsvg "$f" -o "$svg" done echo "==> done. Serving at http://localhost:9099 (ctrl-c to stop)" cd "$DOCS_DIR" && python3 -m http.server 9099