]> git.donarmstrong.com Git - lilypond.git/blob - buildscripts/clean-fonts.sh
patch::: 1.4.1.jcn3
[lilypond.git] / buildscripts / clean-fonts.sh
1 #!@SHELL@
2 # use kpsewhich?
3 # maybe (optionally) (not) clean stuff from other versions, ie, don't clean
4 #     /var/spool/texmf/tfm/lilypond/<NOT-OUR-VERSION>/
5 # ?
6
7 VERSION="@TOPLEVEL_VERSION@"
8
9 case  $# in
10 0) 
11     WHAT="" ;;
12 1)
13     WHAT=$1;;
14 esac
15
16 dirs=".
17 /var/lib/texmf
18 /var/spool/texmf
19 /var/tmp/texfonts
20 /var/texfonts
21 "
22
23 for i in $dirs; do
24         if [ -d "$i" ]; then
25                 TEXDIRS="$TEXDIRS $i"
26         fi
27 done
28
29 if [ -z "$TEXDIRS" -o "$TEXDIRS" = "." ]; then
30     TEXDIRS=". /var"
31 fi
32
33 # remove possibly stale .pk/.tfm files 
34 FILES=`find $TEXDIRS -name "feta*$WHAT*tfm" -or -name "feta*$WHAT*pk"`
35
36 echo removing $FILES
37 rm  -f $FILES /tmp/cleaning-font-dummy