Created
May 8, 2017 19:04
-
-
Save wangkuiyi/cae5260fb303d99ce7e6e9bf4fe6c8dd to your computer and use it in GitHub Desktop.
Plot Majel's package dependencies
This file contains hidden or 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
for i in $(du -a | cut -f 2); do | |
if [[ -d $i ]]; then | |
echo === $i | | |
sed 's/\.//'; | |
grep '#include <majel' $i/*.{h,cu,cc,cpp,hpp,hh} 2>/dev/null | | |
sed 's/^.*#include <majel//' | | |
sed 's/\/[-_a-z0-9]*.h>$//' | | |
sort | | |
uniq; | |
fi; | |
done | | |
sed -e 's/^$/\//' | | |
gawk '{ if ($1 == "===") { start=$2; if (start=="") start ="/"; } else { printf("\"%s\" -> \"%s\";\n", start, $1); } }' > /tmp/majel.dot |
Author
wangkuiyi
commented
May 8, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment