~ubuntu-branches/ubuntu/precise/lilypond/precise

« back to all changes in this revision

Viewing changes to buildscripts/clean-fonts.sh

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2006-12-19 10:18:12 UTC
  • mfrom: (3.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061219101812-7awtjkp0i393wxty
Tags: 2.8.7-3
scripts/midi2ly.py: When setting DATADIR, find Lilypond python files
in the @TOPLEVEL_VERSION@ directory, not 'current'.  Patch thanks to
Chris Lamb (chris@chris-lamb.co.uk).  (Closes: #400550)

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
/var/cache/fonts
22
 
/usr/share/texmf/fonts
23
 
"
24
 
 
25
 
for i in $dirs; do
26
 
        if [ -d "$i" ]; then
27
 
                TEXDIRS="$TEXDIRS $i"
28
 
        fi
29
 
done
30
 
 
31
 
if [ -z "$TEXDIRS" -o "$TEXDIRS" = "." ]; then
32
 
    TEXDIRS=". /var"
33
 
fi
34
 
 
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")
40
 
 
41
 
echo removing $FILES
42
 
rm  -f $FILES /tmp/cleaning-font-dummy