Jonathan Kulp <jonlancekulp <at> gmail.com> writes: > > Well, my face is red. Just tried my script from a different directory > and it doesn't put the output in the right place. I guess I've always > just cd'd to the right dir before running the script. Sorry about that! > I'll see if I can make it work right. Just have to figure out how to > capture the path of the first argument. I'm new at scripting so this > could take a while :) >
The script below doesn't open up a pdf viewer (that can be added from your script), but it does make sure all the output is in the same directory as the source file. -----Jay #!/bin/sh #last argument for LY; do :; done #All but last argument ARGS=`echo $@ | sed -e 's_^\s*\(\(\S\S*\s\s*\)*\)\S\S*\s*$_\1_'` #Run lilypond from the directory where the file lives cd `dirname $LY` CMD="lilypond $ARGS $(basename $LY)" echo $CMD eval $CMD _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user