[Intel-gfx] [PATCH i-g-t] igt_command_line.sh: Fix bashism
Petri Latvala
petri.latvala at intel.com
Tue Sep 26 12:27:52 UTC 2017
On Tue, Sep 26, 2017 at 02:01:46PM +0200, Daniel Vetter wrote:
> On Mon, Sep 25, 2017 at 02:48:41PM +0300, Jani Nikula wrote:
> > On Mon, 25 Sep 2017, Petri Latvala <petri.latvala at intel.com> wrote:
> > > [[ a != b ]] is a bashism. As it's just comparing $1 to an empty
> > > string, use -n with a normal [ ].
> > >
> > > /bin/sh is dash in CI.
> >
> > There's probably /bin/bash around anyway, but I'm tired of fighting the
> > fight. So never mind about that.
>
> Yeah, let's just switch to /bin/bash and stop bothering with dash. At
> least I don't see any value in trying to be posix compliant, we're not
> going to run on anything that doesn't have bash anyway.
This script is used only on build-time anyway so the shebang doesn't
really matter much.
I made the shebang use /bin/bash in v2 (in addition to the changes in
v1) so it doesn't need further handholding and pushed with an IRC ack
from Daniel.
--
Petri Latvala
More information about the Intel-gfx
mailing list