(score_slopes): strong sloping score only when
[lilypond.git] / buildscripts / lilypond-profile.sh
blob16afdaba978ef86cbe19c9dedee0b80e26bd18fc
1 #!/bin/sh
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
8 # . /PATH/TO/lilypond-profile
12 # workaround for ZSH posix $0-problem
14 # for zsh: start removing here
15 if [ -n "$ZSH_NAME" ] ; then
16 echo "You are running this script under zsh. Edit this script by hand. "
17 echo
18 echo "(failed to source lilypond-profile)"
19 return 2
22 if [ `basename "$0"` = "lilypond-profile" ] ; then
23 cat >/dev/stderr <<EOF
25 Error: This script cannot be run in a subshell; it MUST be sourced.
28 EXAMPLE 1: One time use
30 * Do
32 . $0
36 EXAMPLE 2: Install for self
38 * Do
40 cp lilypond-profile $HOME/bin/
42 * Add
44 . $HOME/bin/lilypond-profile
46 to either $HOME/.profile or $HOME/.bash_profile,
48 * Logout.
51 EXAMPLE 3: Install for all users.
53 * Do
55 mv lilypond-profile /etc/profile.d/lilypond.sh
57 * Logout
59 EOF
61 return 2
62 else
63 # for zsh: till here
65 if [ -z "$LILYPONDPREFIX" ]; then
66 datadir=`echo "@local_lilypond_datadir@" | sed 's!//!/!g'`
67 else
68 if [ -d "$LILYPONDPREFIX/share" ]; then
69 datadir=$LILYPONDPREFIX/share/lilypond/
71 echo "Setting tree to $datadir"
74 # Add the installation directory to the teTeX system tree,
75 # see Documentation/misc/fontinstallation
76 if [ -z `echo $TEXMF | grep "$datadir"` ]; then
77 TEXMF="{$datadir,"`kpsexpand \\$TEXMF`"}"
78 export TEXMF
82 # For direct ps output: ps/lilyponddefs.ps
83 GS_LIB="$datadir/ps:"${GS_LIB:=""}
84 export GS_LIB
86 # For direct ps output fonts. Add all available TeX Type1 fonts
87 tmppfadir=`kpsewhich ecrm10.pfa`
88 GS_FONTPATH=$datadir/pfa:`dirname $tmppfadir`:${GS_FONTPATH:=""}
89 export GS_FONTPATH
91 fi # remove for zsh