2023-11-14 13:23:54 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
declare path=""
|
|
|
|
|
|
|
|
if [[ "$1" == -h || "$1" == --help ]]; then
|
|
|
|
cat <<HELP
|
|
|
|
Builds the digraphs for this project. Must be run from top level git directory
|
|
|
|
HELP
|
|
|
|
exit 0
|
|
|
|
elif [[ -d .git ]]; then
|
|
|
|
path="./graphviz"
|
|
|
|
elif [[ -d ../.git ]]; then
|
|
|
|
path="../graphviz"
|
|
|
|
else
|
|
|
|
cat <<HELP
|
|
|
|
Builds the digraphs for this project. Must be run from top level git directory
|
|
|
|
HELP
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2023-11-14 16:54:02 -07:00
|
|
|
for name in $(find "${path}" -type f -name '*.dot'); do
|
2023-11-14 14:32:25 -07:00
|
|
|
dot -Tsvg -o "${name%.*}.svg" "$name"
|
2023-11-14 13:23:54 -07:00
|
|
|
done
|