Re: [PATCH v2] travis-ci: build and test Git on Windows
- From
Jeff King <peff@peff.net>
- Date
- Mar 24, 2017, 14:59 UTC
- Message-ID
- <20170324145940.xqjmwxphwmtx67ug@sigill.intra.peff.net>
- In-Reply-To
- <20170324113747.44991-1-larsxschneider@gmail.com>
On Fri, Mar 24, 2017 at 12:37:47PM +0100, Lars Schneider wrote:
Show 6 quoted lines
> I think I addressed all issues from the v1 review (see interdiff below) > with one exception. The script still uses bash instead of sh. Something > about this does not work in sh: > --output >(sed "$(printf '1s/^\xef\xbb\xbf//')" >cat >&3) > > Does anyone know how to make this sh compatible?
Process substitution is a bash-ism. Just looking at this snippet I would ask why you aren't just using stdout, but from the whole diff it looks like you're using --write-out and want to keep the streams separate.
The POSIX shell way would be to make your own named pipe rather than anonymous one:
mkfifo data sed ... <data & curl ... --output data rm data
But I don't think relying on bash is that big a deal, as long as the script is clearly marked with the correct #!-line (which it is).
The ">cat" isn't doing AFAICT, though.
-Peff