git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Asgeir S. Nilsen" <asgeir@twingine.no>, git@vger.kernel.org
Subject: Re: [PATCH] contrib: Replaced /bin/sh with /bin/bash to make scripts with Bash syntax work on Solaris.
Date: Mon, 9 Aug 2010 15:16:29 -0500	[thread overview]
Message-ID: <20100809201629.GB2888@burratino> (raw)
In-Reply-To: <7vvd7j67wo.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:

>> 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

      reply	other threads:[~2010-08-09 20:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-06 12:56 [PATCH] contrib: Replaced /bin/sh with /bin/bash to make scripts with Bash syntax work on Solaris Asgeir S. Nilsen
2010-08-06 16:00 ` Junio C Hamano
     [not found]   ` <AANLkTi=niNfKy0JgOG4hqNtXYQPfbkd10NRDDKM1rhfB@mail.gmail.com>
2010-08-09 16:44     ` Junio C Hamano
2010-08-10 12:33       ` Greg Troxel
2010-08-08  3:11 ` Jonathan Nieder
2010-08-09 16:57   ` Junio C Hamano
2010-08-09 20:16     ` Jonathan Nieder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100809201629.GB2888@burratino \
    --to=jrnieder@gmail.com \
    --cc=asgeir@twingine.no \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).