- : ${MAKETEXDIR=$TEXMF/maketex}
- test -r $MAKETEXDIR/maketex.site && . $MAKETEXDIR/maketex.site
- : ${MT_DESTROOT=$TEXMF/fonts}
-
- # Remove the "stray" old LilyPond TFM and PK files.
- for i in tfm pk
- do
- find $MT_DESTROOT/$i \( -name 'dyn10.*'$i -o -name 'font-en-tja*.*'$i \
- -o -name 'vette-beams*.*'$i \) -print0 |
- xargs --null --no-run-if-empty rm -f
- done
-
- # Remove empty directories.
- # A note to myself or the future maintainer:
- # Why the "for i in 1 2" loop? Well, it seems that either
- # "find some_path -depth" isn't working properly, or I
- # (Anthony) don't know its proper behaviour. Please look
- # into it and see if this ugly hack could be removed.
- for i in 1 2
- do
- find $MT_DESTROOT/tfm -depth -mindepth 1 -type d -empty -print0 2> /dev/null |
- xargs -0r --null --no-run-if-empty rmdir
- find $MT_DESTROOT/pk -depth -mindepth 2 -type d -empty -print0 2> /dev/null |
- xargs -0r --null --no-run-if-empty rmdir
- done
+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