Skip to content

Instantly share code, notes, and snippets.

@blalor
Created July 27, 2016 10:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blalor/8a9581672e1c2c63a3da160fe8189d61 to your computer and use it in GitHub Desktop.
Save blalor/8a9581672e1c2c63a3da160fe8189d61 to your computer and use it in GitHub Desktop.
homebrew dependency tree with graphviz
#!/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