lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lilypond & Ubuntu Help


From: Jay Anderson
Subject: Re: Lilypond & Ubuntu Help
Date: Mon, 18 Aug 2008 00:55:13 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]