Ticket #19858: Lilypond.engine

File Lilypond.engine, 702 bytes (added by singingwolfboy@…, 15 years ago)

Lilypond engine for TeXShop

Line 
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:
5if [ -x ${PREFIX}/bin/lilypond ]; then
6    LILYPOND=${PREFIX}/bin/lilypond
7
8# next, check for LilyPond.app
9elif [ -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?
13else
14    LILYPOND=`which lilypond`
15fi
16
17# if it was none of these, the LILYPOND variable will be blank
18if [ $LILYPOND ]; then
19    echo "Passing file to Lilypond, just a moment..."
20    $LILYPOND "$1"
21else
22    echo "Lilypond executable not found."
23fi