Created
December 2, 2011 01:30
-
-
Save zhangsen/1421246 to your computer and use it in GitHub Desktop.
analyze fl packages
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
find * -type f ! \( -name '*.recipe' -o -name '*.patch' \) | while read f; do if ! file $f | grep -qi 'text\|xml\|empty'; then echo $f; fi; done > /tmp/files.bin | |
cat /tmp/files.bin | while read ln; do pkg=`echo "$ln" | cut -d/ -f1`; f=`echo "$ln" | cut -d/ -f2`; grep -q "$f" $pkg/$pkg.recipe && echo $ln; done > /tmp/files.bin.directly-referenced | |
diff -u /tmp/files.bin.directly-referenced /tmp/files.bin | grep '^+[^+]' | cut -c2- > /tmp/files.bin.un-refed | |
xargs -a /tmp/files.bin -d '\n' du -s | sort -nr > /tmp/files.bin-sizes-no-human | |
du -s * | sort -nr > /tmp/pkgs.size | |
cat /tmp/files.bin | grep -v 'png\|jpg\|svg\|vimrc' > /tmp/files.exclude-pics | |
cat /tmp/files.bin.un-refed | cut -d/ -f1 | sort -u | while read pkg; do grep -H 'addArchive\|addSource' "$pkg/$pkg.recipe" | grep '//'; done > /tmp/files.bin-have-net-download | |
cat /tmp/files.exclude-pics | cut -d/ -f1 | sort -u | while read pkg; do grep -H 'addArchive\|addSource' "$pkg/$pkg.recipe" | grep '//'; done | |
cat /tmp/files.bin | cut -d/ -f1 | sort -u |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment