diff options
author | Markus Ullmann <jokey@gentoo.org> | 2007-04-18 15:28:33 +0000 |
---|---|---|
committer | Markus Ullmann <jokey@gentoo.org> | 2007-04-18 15:28:33 +0000 |
commit | 1c06a9358214cb128ad207d65104dd1ab5793dc4 (patch) | |
tree | ae50f3fe68138dbc3df9ebd682da169ff47cd77e /scripts | |
parent | another cool one (diff) | |
download | jokey-1c06a9358214cb128ad207d65104dd1ab5793dc4.tar.gz jokey-1c06a9358214cb128ad207d65104dd1ab5793dc4.tar.bz2 jokey-1c06a9358214cb128ad207d65104dd1ab5793dc4.zip |
First prototype, but slow as hell :(
svn path=/trunk/; revision=206
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/unused-pmask-localuse.sh | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/scripts/unused-pmask-localuse.sh b/scripts/unused-pmask-localuse.sh new file mode 100755 index 0000000..781f976 --- /dev/null +++ b/scripts/unused-pmask-localuse.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +grep / profiles/package.mask | sed "/^#/d" > /tmp/atoms + +echo "checking for unused atom(s) in package.mask..." +unusedpmask="" +for atom in `cat /tmp/atoms` +do + echo -n "checking '${atom}'... " + if [[ "`pquery --raw --repo ${PWD} ${atom}`" == "" ]] ; then + echo "!!! Unused !!!" + unusedpmask="${unusedpmask} ${atom}" + else + echo "has atom(s)" + fi +done +echo "Done checking package.mask" +echo + +cut -d ":" -f 1 profiles/use.local.desc | grep "/" | sort | uniq > /tmp/atoms +unusedlocaldesc="" +echo "checking for unused atom(s) in use.local.desc..." +for atom in `cat /tmp/atoms` +do + echo -n "checking '${atom}'... " + if [[ "`pquery --raw --repo ${PWD} ${atom}`" == "" ]] ; then + echo "!!! Unused !!!" + unusedlocaldesc="${unusedlocaldesc} ${atom}" + else + echo "has atom(s)" + fi +done +echo "Done checking use.local.desc" +echo + +rm /tmp/atoms + +if [[ ${unusedpmask} != "" ]] ; then + echo "The following atoms in package.mask are not in use at the moment:" + for atom in ${unusedpmask} ; do + echo ${atom} + done +fi + +if [[ ${unusedlocaldesc} != "" ]] ; then + echo "The following atoms in use.local.desc are not in use at the moment:" + for atom in ${unusedlocaldesc} ; do + echo ${atom} + done +fi + |