On 24/07/08 03:52PM, Junio C Hamano wrote: > Junio C Hamano <gitster@xxxxxxxxx> writes: > > > I think the consensus from the last discussion we had was to allow > > scripts that rely on bash-isms to say "#!/usr/bin/env bash" because > > we know /bin/sh can legitimately be not bash and we assume bash may > > not be installed as /bin/bash. > > Let's do this before we forget. > > ------- >8 ------------- >8 ------------- >8 ------- > Subject: [PATCH] ci: unify bash calling convention > > Under ci/ hierarchy, we run scripts under either "sh" (any Bourne > compatible POSIX shell would work) or specifically "bash" (as they > require features from bash, e.g., $(parameter/pattern/string} > expansion). As we have the CI envionment under our control, we can s/envionment/environment > expect that /bin/sh will always be fine to run the scripts that only > require Bourne, but we may not know where "bash" gets installed > depending on distros. > > So let's make sure we start these scripts with either one of these: > > #!/bin/sh > #!/usr/bin/env bash > > Yes, the latter has to assume that everybody installs "env" at that > path and not as /bin/env or /usr/local/bin/env, but this currently > is the best we could do. Makes sense to me to be consistent and I also think `#!/usr/bin/env bash` is probably the best route. Other than the small typo this looks good to me. -Justin