File: preinst

package info (click to toggle)
lilypond 2.19.83-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 76,396 kB
  • sloc: cpp: 79,385; ansic: 75,071; lisp: 59,263; xml: 31,196; python: 22,406; sh: 8,159; yacc: 3,872; perl: 3,507; asm: 1,587; lex: 1,408; makefile: 1,048; tcl: 457; awk: 199; php: 53; csh: 50
file content (49 lines) | stat: -rw-r--r-- 1,257 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
#
# preinst script for the Debian GNU/Linux lilypond package
#   by Anthony Fok <foka@debian.org>
#   This is free software; see the GNU General Public Licence
#   version 2 or later for copying conditions.  There is NO warranty.
#   Last modified:  Mon,  5 Apr 1999 20:30:12 -0600

set -e

package=lilypond
font_supplier=public
font_typeface=lilypond
std_TEXMFMAIN=/usr/share/texmf
std_VARTEXFONTS=/var/spool/texmf

#DEBHELPER#

TEXMFMAIN=`kpsewhich -expand-var '$TEXMFMAIN'`
: ${TEXMFMAIN:=$std_TEXMFMAIN}
VARTEXFONTS=`kpsewhich -expand-var '$VARTEXFONTS'`
: ${VARTEXFONTS=$std_VARTEXFONTS}

LILYTEXINPUTS=$TEXMFMAIN/tex/$package
LILYMFINPUTS=$TEXMFMAIN/fonts/source/$font_supplier/$font_typeface

case "$1" in
    install|upgrade)
	# Clear out the old TFM and PK files in case the fonts were
	# left-over from previous installations
	rm -rf $VARTEXFONTS/tfm/$font_supplier/$font_typeface
	rm -rf $VARTEXFONTS/pk/*/$font_supplier/$font_typeface

	# Fix a silly bug in Debian's lilypond 1.0.17-1.  :-)
	if [ "$2" = "1.0.17-1" ]; then
	    rm -rf $VARTEXFONTS/tfm/$font_supplier/mf
	    rm -rf $VARTEXFONTS/pk/*/$font_supplier/mf
	fi
    ;;

    abort-upgrade)
    ;;

    *)
	echo "$0 called with unknown argument \`$1'" >&2
	exit 0
    ;;

esac