Re: [PATCH] Avoid using non-portable `echo -n` in tests.
- From
Jeff King <peff@peff.net>
- Date
- Oct 31, 2008, 18:39 UTC
- Message-ID
- <20081031183933.GA3577@sigill.intra.peff.net>
- In-Reply-To
- <20081031183601.GB8464@artemis.corp>
On Fri, Oct 31, 2008 at 07:36:01PM +0100, Pierre Habouzit wrote:
> Set up a Debian autobuilder with dash as a /bin/sh (apt-get install > dash, dpkg-reconfigure -plow dash and say 'yes'). You'll see those kind > of problems arise immediately.
I don't need to; my development box is Debian with dash as /bin/sh. :)
Show 5 quoted lines
> Dash is a POSIX compatible shell, with almost no extension added (in > particular its echo has no -n option) which helps to find those kind of > issues. > > It would help detecting git shell scripts that use bashism as well.
Agreed, and actually I found such a bashism (test ==) last week (though of course it also broke on FreeBSD).
-Peff