]> git.donarmstrong.com Git - lilypond.git/blob - buildscripts/lilypond-profile.sh
* aclocal.m4: Regenerate.
[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 if [ -z "$LILYPONDPREFIX" ]; then
12     datadir=`echo "@datadir@" | sed 's!//!/!g'`
13 else
14     if [ -d "$LILYPONDPREFIX/fonts" ]; then
15         datadir=$LILYPONDPREFIX
16     else
17         eval `cat $LILYPONDPREFIX/VERSION`
18         FULLVERSION="$MAJOR_VERSION.$MINOR_VERSION.$PATCH_LEVEL"
19         if [ "" != "$MY_PATCH_LEVEL" ]; then
20             FULLVERSION="$FULLVERSION.$MY_PATCH_LEVEL"
21         fi 
22         
23         datadir="$LILYPONDPREFIX/share/lilypond/$FULLVERSION"
24     fi
25     echo "Setting tree to $datadir"
26 fi
27
28 # Add the installation directory to the teTeX system tree, 
29 # see Documentation/misc/fontinstallation
30 TEXMF="{$datadir,"`kpsexpand  \\$TEXMF`"}"
31 export TEXMF
32
33 # For direct ps output: ps/lilyponddefs.ps
34 GS_LIB="$datadir/ps:"${GS_LIB:=""}
35 export GS_LIB
36
37 # For direct ps output fonts. Add all available TeX Type1 fonts
38 GS_FONTPATH=`kpsewhich -expand-path=\\$T1FONTS`:${GS_FONTPATH:=""}
39 export GS_FONTPATH
40
41         
42
43