Created
July 27, 2016 10:39
-
-
Save blalor/8a9581672e1c2c63a3da160fe8189d61 to your computer and use it in GitHub Desktop.
homebrew dependency tree with graphviz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e -u -o pipefail | |
{ | |
echo 'digraph G {' | |
brew list | while read cask; do | |
printf '"%s";\n' $cask | |
brew deps $cask | while read dep; do | |
printf '"%s" -> "%s";\n' $cask $dep | |
done | |
done | |
echo '}' | |
} > brew_deps.dot | |
dot -T png -o brew_deps.png brew_deps.dot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment