summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tlpkg-by-size
blob: cd252bbd6727c872ee495c98bea482ad2b227496 (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/archive
cd "$1" || exit 1
for pkgtar in `ls *.tar.xz | egrep -v '\..*\.tar\.xz$'`; do
  pkg=`echo $pkgtar | sed 's/\.tar\.xz$//'`
  size=`cat $pkg.*tar.xz | wc -c`
  size=`expr $size / 1024`
  printf "%6d %s\n" $size "$pkg"
done | sort -nr