24 lines
498 B
Bash
Executable file
24 lines
498 B
Bash
Executable file
#!/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
|
|
|
|
for name in $(find "${path}" -type f -name '*.dot'); do
|
|
dot -Tsvg -o "${name%.*}.svg" "$name"
|
|
done
|