Re: STDOUT and Hook Scripts

2010-03-11 Thread Les Mikesell
On 3/11/2010 12:56 PM, Stein Somers wrote: The post-commit hook starts a single process, and eats its STDOUT. But you can make that single process into whatever you want. If you hook script is for instance: #!/bin/sh perl watch-file.pl | perl notify.pl then your hook consists of a shell proces

Re: STDOUT and Hook Scripts

2010-03-11 Thread Stein Somers
The post-commit hook starts a single process, and eats its STDOUT. But you can make that single process into whatever you want. If you hook script is for instance: #!/bin/sh perl watch-file.pl | perl notify.pl then your hook consists of a shell process and two perl processors working togethe

Re: STDOUT and Hook Scripts

2010-03-10 Thread Ryan Schmidt
On Mar 10, 2010, at 18:35, David Weintraub wrote: > On Wed, Mar 10, 2010 at 1:31 PM, Ted Stern wrote: >> What about this basic shell manipulation? >> >> #!/bin/sh >> >> exec 1>&2# combine stdout with stderr >> >> # do stuff that generates stdout >> >> if [ ] ; then >> exit 1 # re

Re: STDOUT and Hook Scripts

2010-03-10 Thread David Weintraub
On Wed, Mar 10, 2010 at 1:31 PM, Ted Stern wrote: > What about this basic shell manipulation? > > #!/bin/sh > > exec 1>&2    # combine stdout with stderr > > # do stuff that generates stdout > > if [ ] ; then >   exit 1       # return non-zero exit every time there's stdout > fi I know that hook

Re: STDOUT and Hook Scripts

2010-03-10 Thread Ted Stern
On 10 Mar 2010 05:30:03 -0800, David Weintraub wrote: > > I know that when you run a hook, the STDOUT is not returned to the > user, and STDERR is only returned if that hook returns a non-zero exit > code. > > However, I'm writing a post-commit hook, and I'd like to know if it is > possible to pipe