Re: [PATCH] Use bash for test.sh.

Eitan Adler <[email protected]>
Newsgroups gmane.comp.compilers.ccache
Message-ID <CAF6rxgnSgVBAO7bpUHQn0JJhmj8=hbvW5F1+nDBi2F94yCJhTA@mail.gmail.com>
On 5 November 2012 12:55, Andrew Stubbs <[email protected]> wrote:
> The test script fails with shells other than bash. At least dash
> doesn't work.
>
> Signed-off-by: Andrew Stubbs <[email protected]>
> ---
>  test.sh |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/test.sh b/test.sh
> index 4c78617..a334f62 100755
> --- a/test.sh
> +++ b/test.sh
> @@ -1,4 +1,4 @@
> -#!/bin/sh
> +#!/bin/bash


This line is buggy:
please http://blog.eitanadler.com/2012/10/binbash-considered-harmful.html
for why.

I ideally the non-portable bashims get fixed but if not the shebang
line must be "/usr/bin/env bash" not /bin/bash.

-- 
Eitan Adler
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.