*** empty log message ***
[lilypond.git] / buildscripts / clean-fonts.sh
blob0dc0ff2684a2abe11b24dfdee3c46c9d8e2ad715
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 # ?
7 VERSION="@TOPLEVEL_VERSION@"
9 case $# in
10 0)
11 WHAT="" ;;
13 WHAT=$1;;
14 esac
16 dirs=".
17 /var/lib/texmf
18 /var/spool/texmf
19 /var/tmp/texfonts
20 /var/texfonts
21 /var/cache/fonts
22 /usr/share/texmf/fonts
25 for i in $dirs; do
26 if [ -d "$i" ]; then
27 TEXDIRS="$TEXDIRS $i"
29 done
31 if [ -z "$TEXDIRS" -o "$TEXDIRS" = "." ]; then
32 TEXDIRS=". /var"
35 # remove possibly stale .pk/.tfm files
36 FILES=$(find $TEXDIRS -name "feta*$WHAT*tfm" \
37 -or -name "feta*$WHAT*pk" \
38 -or -name "parmesan$WHAT*tfm" \
39 -or -name "parmesan*$WHAT*pk")
41 echo removing $FILES
42 rm -f $FILES /tmp/cleaning-font-dummy