Files
mitus/docs/render.sh
2026-05-06 11:51:43 -03:00

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