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

Re: [PATCH] contrib: Replaced /bin/sh with /bin/bash to make scripts with Bash syntax work on Solaris.

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 9, 2010, 20:16 UTC
Message-ID
<20100809201629.GB2888@burratino>
In-Reply-To
<7vvd7j67wo.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
Show 5 quoted lines
>> Maybe, relying on a sane $PATH:
>>
>> 	#!/usr/bin/env sh
>
> That's even worse.  Please don't go there.

Okay. I was trying to be exhaustive, even if most of the strategies I mentioned are insane (“maybe” was probably too strong of a word :)). (For example, I remember some version of Cygwin requiring the #! line, so I fear it is dangerous to leave that off.)

After-the-fact s,/bin/sh,$SHELL_THE_USER_WANTS, substitution is the only sane strategy I have seen used in practice. POSIX has even blessed something like it, at last.

http://www.opengroup.org/onlinepubs/9699919799/utilities/sh.html#tag_20_117_16
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “contrib: Replaced /bin/sh with /bin/bash to make scripts with Bash syntax work on Solaris.”
  1. contrib: Replaced /bin/sh with /bin/bash to make scripts with Bash syntax work on Solaris.Asgeir S. Nilsen, Aug 6, 2010
  2. Junio C HamanoAug 6, 2010
  3. Jonathan NiederAug 8, 2010
  4. Junio C HamanoAug 9, 2010
  5. Jonathan NiederAug 9, 2010
  6. Junio C HamanoAug 9, 2010
  7. Greg TroxelAug 10, 2010

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.