lilypond-1.5.9
[lilypond.git] / debian / preinst
blob270b2db61dba503b3bb08a1f704798cd76d05d1f
1 #!/bin/sh
3 # preinst 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 Apr 1999 20:30:12 -0600
9 set -e
11 package=lilypond
12 font_supplier=public
13 font_typeface=lilypond
14 std_TEXMFMAIN=/usr/share/texmf
15 std_VARTEXFONTS=/var/spool/texmf
17 #DEBHELPER#
19 TEXMFMAIN=`/usr/bin/kpsewhich -expand-var '$TEXMFMAIN'`
20 : ${TEXMFMAIN:=$std_TEXMFMAIN}
21 VARTEXFONTS=`/usr/bin/kpsewhich -expand-var '$VARTEXFONTS'`
22 : ${VARTEXFONTS=$std_VARTEXFONTS}
24 LILYTEXINPUTS=$TEXMFMAIN/tex/$package
25 LILYMFINPUTS=$TEXMFMAIN/fonts/source/$font_supplier/$font_typeface
27 case "$1" in
28 install|upgrade)
29 # Clear out the old TFM and PK files in case the fonts were
30 # left-over from previous installations
31 rm -rf $VARTEXFONTS/tfm/$font_supplier/$font_typeface
32 rm -rf $VARTEXFONTS/pk/*/$font_supplier/$font_typeface
34 # Fix a silly bug in Debian's lilypond 1.0.17-1. :-)
35 if [ "$2" = "1.0.17-1" ]; then
36 rm -rf $VARTEXFONTS/tfm/$font_supplier/mf
37 rm -rf $VARTEXFONTS/pk/*/$font_supplier/mf
41 abort-upgrade)
45 echo "$0 called with unknown argument \`$1'" >&2
46 exit 0
49 esac