]> git.donarmstrong.com Git - lilypond.git/blob - debian/postrm
release: 0.1.31
[lilypond.git] / debian / postrm
1 #!/bin/bash -e
2 #
3 # postrm script for the Debian GNU/Linux lilypond package
4 #   by Anthony Fok <foka@gpu.srv.ualberta.ca>
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, 10 Nov 1997 22:44:37 -0700
8
9 package=lilypond
10 font_supplier=public
11 font_typeface=lilypond
12 std_TEXMF=/usr/lib/texmf
13
14 if [ "`which kpsetool`" ]; then
15     TEXMF=`kpsetool -v '$TEXMF'`
16 fi
17 : ${TEXMF:=$std_TEXMF}
18
19
20 case "$1" in
21     remove)
22         if [ "`kpsetool -w tex lilyponddefs.tex 2>/dev/null`" -a "`which texhash`" ]; then
23             texhash
24         fi
25     ;;
26
27     upgrade)
28         # Clear out the old TFM and PK files in case the fonts were modified
29         : ${MAKETEXDIR=$TEXMF/maketex}
30         test -r $MAKETEXDIR/maketex.site && . $MAKETEXDIR/maketex.site
31         : ${MT_DESTROOT=$TEXMF/fonts}
32         rm -rf $MT_DESTROOT/tfm/$font_supplier/$font_typeface
33         rm -rf $MT_DESTROOT/pk/*/$font_supplier/$font_typeface
34     ;;
35
36     purge)
37         : ${MAKETEXDIR=$TEXMF/maketex}
38         test -r $MAKETEXDIR/maketex.site && . $MAKETEXDIR/maketex.site
39         : ${MT_DESTROOT=$TEXMF/fonts}
40         rm -rf $MT_DESTROOT/tfm/$font_supplier/$font_typeface
41         rm -rf $MT_DESTROOT/pk/*/$font_supplier/$font_typeface
42     ;;
43
44     failed-upgrade|abort-install|abort-upgrade|disappear)
45     ;;
46
47     *)
48         echo "postrm called with unknown argument \`$1'" >&2
49         exit 0
50     ;;
51 esac