Re: [PATCH] #!/bin/sh --> #!/usr/bin/env bash

From: David A. Wheeler <dwheeler@dwheeler.com>
Date: 2005-04-23 12:34:12
> Alecs King wrote:
> 
>>
>> And as for bash, only gitdiff-do and gitlog.sh 'explicitly' use bash
>> instead of /bin/sh.  On most Linux distros, /bin/sh is just a symbolic
>> link to bash.  But not on some others.  I found gitlsobj.sh could not
>> work using a plain /bin/sh on fbsd.  To make life easier, i think it
>> might be better if we all explicitly use bash for all shell scripts.


H. Peter Anvin wrote:
> How about #!/bin/bash (build from .in files if you feel it necessary to 
> support systems which don't have bash in /bin) instead of doubling the 
> number of execs?

If # of execs is that critical, it probably should not be in
bash anyway.  OpenBSD (at least 3.1)'s bash appears to be in
/usr/local/bin/bash, NOT /bin/bash.
I'd go with the /bin/env solution for now;
it maximizes the "it just works" factor, and
when it comes time for .in files much of the cogito code (at least)
will probably be rewritten in Perl, and anything performance-sensitive
will be in C.

--- David A. Wheeler
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Sat Apr 23 12:32:25 2005

This archive was generated by hypermail 2.1.8 : 2005-04-23 12:32:26 EST