Skip to content

Commit

Permalink
Desemicolonize
Browse files Browse the repository at this point in the history
  • Loading branch information
codygunton committed Jan 25, 2024
1 parent 4e0135f commit 65d7974
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions barretenberg/cpp/scripts/barretenberg_module_digraph.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
#!/usr/bin/env bash
set -eu

TMP=tmp.dot;
RESULT_DOT=barretenberg_modules.dot;
RESULT_PNG=barretenberg_modules.png;
TMP=tmp.dot
RESULT_DOT=barretenberg_modules.dot
RESULT_PNG=barretenberg_modules.png

# initialize a directed graph for graphviz
echo digraph BarretenbergModules { > $TMP;
echo digraph BarretenbergModules { > $TMP
# populate the directed graph
for file in $(find ./src/barretenberg/ -iname CMakeLists.txt); do
opening_chars=$(head -c 19 "$file");
opening_chars=$(head -c 19 "$file")
if [ "$opening_chars" == barretenberg_module ]; then
awk -f ./scripts/barretenberg_module_digraph_edges.awk $file >> $TMP
fi;
done;
echo } >> $TMP;
fi
done
echo } >> $TMP

# apply transitive reduction to remove dependcies that are implied by other dependencies
cat $TMP | tred > $RESULT_DOT;
rm $TMP;
cat $TMP | tred > $RESULT_DOT
rm $TMP

# produce a PNG of the graph
dot -Tpng $RESULT_DOT -o $RESULT_PNG

0 comments on commit 65d7974

Please sign in to comment.