git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Johannes SchindelinNext: Junio C Hamano
Message 7 of 8 in “travis-ci: build and test Git on Windows”
  1. travis-ci: build and test Git on WindowsLars Schneider, Mar 24, 2017
  2. Daniel StenbergMar 24, 2017
  3. Lars SchneiderMar 24, 2017
  4. Daniel StenbergMar 24, 2017
  5. Sebastian SchuberthMar 24, 2017
  6. Johannes SchindelinMar 29, 2017
  7. Jeff KingMar 24, 2017
  8. Junio C HamanoMar 24, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.