19 lines
477 B
Bash
Executable File
19 lines
477 B
Bash
Executable File
#!/bin/bash
|
|
# Re-render all Graphviz diagrams to SVG.
|
|
# Run after editing any .dot file under docs/graphs/.
|
|
# Usage: ./render.sh
|
|
set -euo pipefail
|
|
|
|
GRAPHS_DIR="$(cd "$(dirname "$0")/graphs" && 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 "$GRAPHS_DIR"/*.dot; do
|
|
svg="${f%.dot}.svg"
|
|
echo "==> $(basename "$f") → $(basename "$svg")"
|
|
dot -Tsvg "$f" -o "$svg"
|
|
done
|