1 | #!/bin/bash |
---|
2 | # We need to find the lilypond executable, and |
---|
3 | # store the location in the LILYPOND variable. |
---|
4 | # First, see if we have Macports lilypond: |
---|
5 | if [ -x ${PREFIX}/bin/lilypond ]; then |
---|
6 | LILYPOND=${PREFIX}/bin/lilypond |
---|
7 | |
---|
8 | # next, check for LilyPond.app |
---|
9 | elif [ -x /Applications/LilyPond.app/Contents/Resources/bin/lilypond ]; then |
---|
10 | LILYPOND=/Applications/LilyPond.app/Contents/Resources/bin/lilypond |
---|
11 | |
---|
12 | # Last ditch effort: is it on the system path? |
---|
13 | else |
---|
14 | LILYPOND=`which lilypond` |
---|
15 | fi |
---|
16 | |
---|
17 | # if it was none of these, the LILYPOND variable will be blank |
---|
18 | if [ $LILYPOND ]; then |
---|
19 | echo "Passing file to Lilypond, just a moment..." |
---|
20 | $LILYPOND "$1" |
---|
21 | else |
---|
22 | echo "Lilypond executable not found." |
---|
23 | fi |
---|