]> git.donarmstrong.com Git - lilypond.git/blob - debian/postrm
partial: 1.0.1.jcn
[lilypond.git] / debian / postrm
1 #!/bin/sh
2 #
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
8
9 set -e
10
11 package=lilypond
12 font_supplier=public
13 font_typeface=lilypond
14 std_TEXMF=/usr/lib/texmf
15
16 #DEBHELPER#
17
18 if [ "`which kpsetool`" ]; then
19     TEXMF=`kpsetool -v '$TEXMF'`
20 fi
21 : ${TEXMF:=$std_TEXMF}
22
23
24 case "$1" in
25     remove)
26         if [ "`kpsetool -w tex lilyponddefs.tex 2>/dev/null`" -a "`which texhash`" ]; then
27             texhash
28         fi
29     ;;
30
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
38     ;;
39
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
46     ;;
47
48     failed-upgrade|abort-install|abort-upgrade|disappear)
49     ;;
50
51     *)
52         echo "postrm called with unknown argument \`$1'" >&2
53         exit 0
54     ;;
55 esac