Files
proxmox/scripts/diagrams/render-global-arbitrage-engine.sh

21 lines
744 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
# Render global-arbitrage-engine.dot to SVG and PNG.
# Usage: from repo root: ./scripts/diagrams/render-global-arbitrage-engine.sh
# Requires: graphviz (dot)
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
DIAGRAM_DIR="${DIAGRAM_DIR:-$REPO_ROOT/docs/11-references/diagrams}"
DOT_FILE="$DIAGRAM_DIR/global-arbitrage-engine.dot"
if [[ ! -f "$DOT_FILE" ]]; then
echo "Error: $DOT_FILE not found." >&2
exit 1
fi
cd "$DIAGRAM_DIR"
dot -Tsvg global-arbitrage-engine.dot -o global-arbitrage-engine.svg
dot -Tpng global-arbitrage-engine.dot -o global-arbitrage-engine.png
echo "Rendered: global-arbitrage-engine.svg, global-arbitrage-engine.png in $DIAGRAM_DIR"