4 # wrapper start script for LilyPond.app on Mac
6 # This file is part of LyX, the document processor.
7 # Licence details can be found in the file COPYING.
10 # Full author contact details are available in file CREDITS.
14 LYXDIR=$(dirname "${0}")
15 # try to find the lilypond installation...
16 # at first try the well known location for LilyPond 2.x
17 # in case this failes try PATH expansion to start the lilypond shell wrapper
18 IFS=":" read -ra DIRLIST <<< "${PATH}"
19 for BINDIR in "/Applications/LilyPond.app/Contents/Resources/bin" "${DIRLIST[@]}" ; do
20 BDIR=$(dirname "${BINDIR}/x")
21 if [ "${BDIR}" != "${LYXDIR}" -a -x "${BINDIR}"/lilypond ]; then
22 exec "${BINDIR}"/lilypond "$@"
26 # report error and exit with failure status
27 echo Could not find lilypond binary.