diff options
author | aurelien <aurelien@cwb.io> | 2012-11-22 09:49:46 +0100 |
---|---|---|
committer | aurelien <aurelien@cwb.io> | 2012-11-22 09:49:46 +0100 |
commit | 9cce2f098d5d77a2748952e1221127b9f0614566 (patch) | |
tree | 033dfbe157c9cdecd2a1d428ee73214e94035424 /pcr/pactools/pt-pacsize | |
parent | c6f82e8dc74a97c194d1e2caeab67ac5b3743335 (diff) | |
download | abslibre-9cce2f098d5d77a2748952e1221127b9f0614566.tar.gz abslibre-9cce2f098d5d77a2748952e1221127b9f0614566.tar.bz2 abslibre-9cce2f098d5d77a2748952e1221127b9f0614566.zip |
+ gtkmm pactools ttf-roboto
Diffstat (limited to 'pcr/pactools/pt-pacsize')
-rwxr-xr-x | pcr/pactools/pt-pacsize | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pcr/pactools/pt-pacsize b/pcr/pactools/pt-pacsize new file mode 100755 index 000000000..e70a34597 --- /dev/null +++ b/pcr/pactools/pt-pacsize @@ -0,0 +1,21 @@ +#!/bin/bash + +##AUTHOR: hads +##See: http://bbs.archlinux.org/viewtopic.php?t=20971 + +for i in /var/lib/pacman/local/*; do + PKG=`echo $i | cut -d '/' -f 6` + SIZE=`grep -A 1 SIZE $i/desc | tail -1` + if [ -x /usr/bin/bc ]; then + if [ $SIZE -gt 1024 ]; then + if [ $SIZE -gt 1048576 ]; then + SIZE=`echo "scale=1;$SIZE/1048576" | bc`M + else + SIZE=`echo "scale=1;$SIZE/1024" | bc`K + fi + else + SIZE={$SIZE}B + fi + fi + echo "$PKG | $SIZE" +done |