X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=buildscripts%2Flilypond-profile.sh;h=da3e1dc1539e70451008e82d28549892d7008da9;hb=f17281ba19ee591b2199cf8edb15f69d72bb772a;hp=bde5816bdd9cc66d0756397793868932657f4aae;hpb=7c4b190c428073b0653ddecdbf8c1a9c1e8bc5c4;p=lilypond.git diff --git a/buildscripts/lilypond-profile.sh b/buildscripts/lilypond-profile.sh old mode 100755 new mode 100644 index bde5816bdd..da3e1dc153 --- a/buildscripts/lilypond-profile.sh +++ b/buildscripts/lilypond-profile.sh @@ -4,33 +4,81 @@ # Red Hat-like systems should install this in /etc/profile.d/ -# This is a bit of a kludge. Ideally, lilypond's tex, afm, pfa, ps -# directories should be installed into their location in the texmf/gs -# trees, rather than messing around with environment variables (eg, -# see Debian or SuSE package). +# If run by hand or from you .profile, run as follows +# . /PATH/TO/lilypond-profile -datadir="@datadir@" -# For direct ps output fonts -GS_FONTPATH="$datadir/afm:$datadir/pfa" -# For direct ps output: ps/lilyponddefs.ps -GS_LIB="$datadir/ps" -# bit silly. for ly2dvi, overrules compiled-in datadir... -# Better comment this out. Compiled-in datadir serves exactly the -# same purpose, but is more likely to be correct (think multiple -# versions of lilypond). -# LILYPONDPREFIX="$datadir" -# include an empty path component for the system wide includes. -MFINPUTS="$datadir/mf:"${MFINPUTS:=":"} -TEXINPUTS="$datadir/tex:$datadir/ps:"${TEXINPUTS:=":"} -TFMFONTS="$datadir/tfm:"${TFMFONTS:=":"} -LILYPONDPREFIX="$datadir" +# In ZSH, $0 is set to the script name, regardless of whether sourced +# or run in a subshell. +if [ -n "$ZSH_NAME" ] ; then + echo "Make sure that this script is sourced, ie. run as " + echo + echo " . lilypond-profile" + echo "" + echo "Continuing anyway ..." + return 2 +fi -export MFINPUTS TEXINPUTS TFMFONTS GS_LIB GS_FONTPATH LILYPONDPREFIX +if [ -z "$ZSH_NAME" -a `basename "$0"` = "lilypond-profile" ] ; then + cat >/dev/stderr <