#! /bin/sh clear echo "****************************************************************" echo "Drop your LilyPond source file here and press Enter" echo "****************************************************************" read fullpath filename=$(basename "${fullpath##*/}" .ly) directory=${fullpath%/*}/ lilypondPDFoutput="${directory}"/$filename".pdf" lilypondMIDIoutput="${directory}"/$filename".midi" key="1" while [ $key = "1" ] do /Applications/LilyPond.app/Contents/Resources/bin/lilypond -o "${directory}" "${fullpath}" wait open "${lilypondPDFoutput}" open "${lilypondMIDIoutput}" echo "****************************************************************" echo "Continue to work. When finished, save your document and choose :" echo "****************************************************************" echo "Refresh: 1" echo "Quit: 2" read key done if [ $key = "2" ] then exit fi