#!/bin/bash #*****************************************# # Run Lilypond on a lot of files and save # # the terminal output in text files # #*****************************************# # determines whether running Mac or Linux OS=$(uname) # set Lilypond PATH if OS is Darwin if [ "$OS" == "Darwin" ] ; then export PATH="$PATH:/Applications/LilyPond.app/Contents/Resources/bin/" fi for LILYFILE in *.ly do STEM=$(basename "$LILYFILE" .ly) echo "running $LILYFILE..." lilypond --format=png "$LILYFILE" >& "$STEM".txt rm "$STEM".ps done grep failed *.txt