Graham Percival <gra...@percival-music.ca> writes:

> On Fri, Jun 17, 2011 at 02:18:55PM -0400, Julien Rioux wrote:
>> On 17/06/2011 2:11 PM, Graham Percival wrote:
>> >Again, on the shell, it would be something like this:
>> >  make ...blah... || echo "build failed" && tail logfile
>> >but there might be a nicer way to do it.
>> 
>> but then when blah fails, make will not stop, since the return
>> status from echo && tail is a success (assuming the log file
>> exists). How would you return failure and force make to stop?
>
> Interesting, I hadn't considered that.  Hmm, is there such a thing
> as functions in bach?

Bash, you mean.  Basically
myfun() { this && that; return 0; }

> If so, it would be easy to return something after doing the echo.

Hm?  You can just write

make ...blah... || { echo "build failed" && tail logfile; exit 1; }

> Of course, we can't guaranteed that bash will be present... does
> sh(1) allow functions?

Like above, it does.

-- 
David Kastrup


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to