summaryrefslogtreecommitdiff
path: root/Build/tools/tpm-by-size
blob: a1dde1fcc70b425880c3bd972719529da5a27051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# $Id: //depot/Master/Tools/tpm-by-size#1 $
# Public domain.  Originally written 2004, Karl Berry.
# 
# Simplistic script to get an idea of the biggest space consumers.
# Just looks at the size fields in the tpm files.

mydir=`dirname $0`
cd $mydir/.. || exit 1  # assume invoked from Master/Tools

find texmf*/tpm -type f \
| xargs grep '<TPM:Size>' \
| sed -e 's/<TPM:Size>/ /' -e 's,</TPM:Size>,,' -e 's,\.tpm:,,' \
| awk '    {printf "%7d %s\n", $2/1024, $1; total+=$2} 
       END {printf "%7d total\n", total/1024}' \
| sort -nr