]> git.donarmstrong.com Git - lilypond.git/blob - debian/preinst
apply Julian's patch to fix install-info warnings
[lilypond.git] / debian / preinst
1 #!/bin/sh
2 #
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
8
9 set -e
10
11 package=lilypond
12 font_supplier=public
13 font_typeface=lilypond
14 std_TEXMFMAIN=/usr/share/texmf
15 std_VARTEXFONTS=/var/spool/texmf
16
17 #DEBHELPER#
18
19 TEXMFMAIN=`kpsewhich -expand-var '$TEXMFMAIN'`
20 : ${TEXMFMAIN:=$std_TEXMFMAIN}
21 VARTEXFONTS=`kpsewhich -expand-var '$VARTEXFONTS'`
22 : ${VARTEXFONTS=$std_VARTEXFONTS}
23
24 LILYTEXINPUTS=$TEXMFMAIN/tex/$package
25 LILYMFINPUTS=$TEXMFMAIN/fonts/source/$font_supplier/$font_typeface
26
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
33
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
38         fi
39     ;;
40
41     abort-upgrade)
42     ;;
43
44     *)
45         echo "$0 called with unknown argument \`$1'" >&2
46         exit 0
47     ;;
48
49 esac