blob: 781f976aff8007068c3322571e776a3d8b6c890e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
|