[PATCH] Require bash shell for symlink-mesa.sh
dbn.lists at gmail.com
Sat Mar 8 08:09:40 PST 2008
On Fri, Mar 7, 2008 at 7:19 PM, Igor Mozolevsky <igor at hybrid-lab.co.uk> wrote:
> On 08/03/2008, Dan Nicholson <dbn.lists at gmail.com> wrote:
> > On Fri, Mar 7, 2008 at 5:27 PM, Joerg Sonnenberger
> > <joerg at britannica.bec.de> wrote:
> > > On Fri, Mar 07, 2008 at 04:38:01PM -0800, Dan Nicholson wrote:
> > > > The symlink-mesa.sh script has a few bashisms, but is currently invoked
> > > > through /bin/sh. This is a problem if /bin/sh isn't bash. Instead,
> > > > require bash and use it to process symlink-mesa.sh.
> > >
> > > What about fixing it to work with sh instead? This is unacceptable for
> > > the BSDs...
> > That'd be the nice thing to do, yes, but a little more work. How do
> > the BSDs deal with this now? Is there another shell this works with? I
> > could easily change the check to something like:
> > AC_PATH_PROG(MESA_SHELL, bash zsh othermagicshell, ...
> I've always build mesa+xserver with BSD's sh w/out a problem... What's
> the bashism that's breaking sh?
I hadn't looked that closely in a while, but I guess it's pretty
clean. Something at least prompted Alan Coopersmith to force bash on
Solaris. So, at least their shell doesn't cut it. Looking now, I see a
couple things that can trip up a purely Bourne shell:
- echo -n: Autoconf has feature tests to avoid this, but they're not used here.
- Potentially empty variables not quoted
I'll send another patch that tries to make the script more Bourne
like. The shell that I'm testing out with is this:
More information about the xorg