lilypond-0.1.44
[lilypond.git] / debian / postrm
blobe3d606b1e69cd3ce32bc77ab69c89ee7f2c47b44
1 #!/bin/sh
3 # postrm script for the Debian GNU/Linux lilypond package
4 # by Anthony Fok <foka@debian.org>
5 # This is free software; see the GNU General Public Licence
6 # version 2 or later for copying conditions. There is NO warranty.
7 # Last modified: Mon, 5 Jan 1998 18:38:11 -0700
9 set -e
11 package=lilypond
12 font_supplier=public
13 font_typeface=lilypond
14 std_TEXMF=/usr/lib/texmf
16 #DEBHELPER#
18 if [ "`which kpsetool`" ]; then
19 TEXMF=`kpsetool -v '$TEXMF'`
21 : ${TEXMF:=$std_TEXMF}
24 case "$1" in
25 remove)
26 if [ "`kpsetool -w tex lilyponddefs.tex 2>/dev/null`" -a "`which texhash`" ]; then
27 texhash
31 upgrade)
32 # Clear out the old TFM and PK files in case the fonts were modified
33 : ${MAKETEXDIR=$TEXMF/maketex}
34 test -r $MAKETEXDIR/maketex.site && . $MAKETEXDIR/maketex.site
35 : ${MT_DESTROOT=$TEXMF/fonts}
36 rm -rf $MT_DESTROOT/tfm/$font_supplier/$font_typeface
37 rm -rf $MT_DESTROOT/pk/*/$font_supplier/$font_typeface
40 purge)
41 : ${MAKETEXDIR=$TEXMF/maketex}
42 test -r $MAKETEXDIR/maketex.site && . $MAKETEXDIR/maketex.site
43 : ${MT_DESTROOT=$TEXMF/fonts}
44 rm -rf $MT_DESTROOT/tfm/$font_supplier/$font_typeface
45 rm -rf $MT_DESTROOT/pk/*/$font_supplier/$font_typeface
48 failed-upgrade|abort-install|abort-upgrade|disappear)
52 echo "postrm called with unknown argument \`$1'" >&2
53 exit 0
55 esac