4 ##See: http://bbs.archlinux.org/viewtopic.php?t=20971
6 for i
in /var
/lib
/pacman
/local
/*; do
7 PKG
=`echo $i | cut -d '/' -f 6`
8 SIZE
=`grep -A 1 SIZE $i/desc | tail -1`
9 if [ -x /usr
/bin
/bc ]; then
10 if [ $SIZE -gt 1024 ]; then
11 if [ $SIZE -gt 1048576 ]; then
12 SIZE
=`echo "scale=1;$SIZE/1048576" | bc`M
14 SIZE
=`echo "scale=1;$SIZE/1024" | bc`K