summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tlpkg-by-size
blob: 9b204966e0b5712d125edf0d023a1e26a10d18a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
# $Id$
# Public domain.  Originally written 2008, Karl Berry.
# If it ever matters, we can do this right by reading tlpdb.

test $# -eq 0 && set - /home/ftp/texlive/tlnet/2008/archive
cd "$1" || exit 1
for pkgtar in `ls *.tar.lzma | egrep -v '\..*\.tar\.lzma$'`; do
  pkg=`echo $pkgtar | sed 's/\.tar\.lzma$//'`
  size=`cat $pkg.*tar.lzma | wc -c`
  size=`expr $size / 1024`
  printf "%6d %s\n" $size "$pkg"
done | sort -nr