3 # Setup TeX/LaTeX Ghostscript environment for LilyPond.
5 # Red Hat-like systems should install this in /etc/profile.d/
7 # If run by hand or from you .profile, run as follows
11 if [ -z "$LILYPONDPREFIX" ]; then
12 datadir=`echo "@datadir@" | sed 's!//!/!g'`
14 if [ -d "$LILYPONDPREFIX/fonts" ]; then
15 datadir=$LILYPONDPREFIX
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"
23 datadir="$LILYPONDPREFIX/share/lilypond/$FULLVERSION"
25 echo "Setting tree to $datadir"
28 # Add the installation directory to the teTeX system tree,
29 # see Documentation/misc/fontinstallation
30 TEXMF="{$datadir,"`kpsexpand \\$TEXMF`"}"
33 # For direct ps output: ps/lilyponddefs.ps
34 GS_LIB="$datadir/ps:"${GS_LIB:=""}
37 # For direct ps output fonts. Add all available TeX Type1 fonts
38 GS_FONTPATH=`kpsewhich -expand-path=\\$T1FONTS`:${GS_FONTPATH:=""}