]> git.donarmstrong.com Git - lilypond.git/blob - buildscripts/lilypond-profile.sh
uhh
[lilypond.git] / buildscripts / lilypond-profile.sh
1 #!/bin/sh
2
3 # Setup TeX/LaTeX Ghostscript environment for LilyPond.
4
5 # Red Hat-like systems should install this in /etc/profile.d/
6
7 # If run by hand or from you .profile, run as follows
8 #   . lilypond-profile
9
10
11
12 if [ "$LILYPONDPREFIX" == "" ] ; then
13     datadir=`echo "@datadir@" | sed 's!//!/!g'`
14 else
15     if [ -d "$LILYPONDPREFIX/fonts" ] ; then
16         datadir=$LILYPONDPREFIX
17     else
18         eval `cat $LILYPONDPREFIX/VERSION`
19         FULLVERSION="$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL"
20         if [ "" != "$MY_PATCH_LEVEL" ]; then
21             FULLVERSION="$FULLVERSION.$MY_PATCH_LEVEL"
22         fi 
23         
24         datadir="$LILYPONDPREFIX/share/lilypond/$FULLVERSION"
25     fi
26     echo "Setting tree to $datadir"
27 fi
28
29 # Add the installation directory to the teTeX system tree, 
30 # see Documentation/misc/fontinstallation
31 TEXMF="{$datadir,"`kpsexpand  \\$TEXMF`"}"
32 export TEXMF
33
34 # For direct ps output: ps/lilyponddefs.ps
35 GS_LIB="$datadir/ps:"${GS_LIB:=""}
36 export GS_LIB
37
38
39
40
41 # For direct ps output fonts. Add all available TeX Type1 fonts
42 GS_FONTPATH=`kpsewhich -expand-path=\\$T1FONTS`:${GS_FONTPATH:=""}
43 export GS_FONTPATH
44
45         
46
47