2023-11-14 13:23:54 -07:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
declare path=""
|
|
|
|
declare -ra fnames=( 'functions' 'global_flow' )
|
|
|
|
|
|
|
|
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 14:32:25 -07:00
|
|
|
for name in ${path}/*.dot; do
|
|
|
|
dot -Tsvg -o "${name%.*}.svg" "$name"
|
|
|
|
done
|
|
|
|
|
|
|
|
for name in ${path}/**/*.dot; do
|
|
|
|
dot -Tsvg -o "${name%.*}.svg" "$name"
|
2023-11-14 13:23:54 -07:00
|
|
|
done
|