Re: [PATCH] test: change "#!/bin/bash" to "#!/usr/bin/env bash" enhances portability

Subject: Re: [PATCH] test: change "#!/bin/bash" to "#!/usr/bin/env bash" enhances portability

Date: Thu, 2 Dec 2010 17:33:04 +0100

To:

Cc: notmuch@notmuchmail.org

From: Joel Borggrén-Franck


On Thu, Dec 2, 2010 at 4:13 PM, Ruben Pollan <meskio@sindominio.net> wrote:
> On 21:27, Wed 01 Dec 10, Joel Borggrén-Franck wrote:
>> From: Joel Borggrén-Franck <jbf@codehouse.se>
>>
>> Change #!/bin/bash at start of tests to "#!/usr/bin/env bash". That way
>> systems running on bash < 4 can prepend bash >= 4 to path before
>> running the tests.
>
> Is there any reason to use bash? Is the test system dependent to any key feature
> of bash?
>
> Not every system has bash installed. To have a dependency on bash just for
> development I think is not a big issue. But if it don't requires any big effort
> I think will be better to have it more generic.
>

The test harness explicitly requires bash >= 4 . The docs say it needs
support for associative arrays.

cheers
/Joel

Thread: