Login | Register
My pages Projects Community openCollabNet

Discussions > dev > Re: [joist-dev] Re: [joist-cvs] CVS update: joist/build build.sh

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

Re: [joist-dev] Re: [joist-cvs] CVS update: joist/build build.sh

Author Daniel Rall <dlr at collab dot net>
Full name Daniel Rall <dlr at collab dot net>
Date 2001-04-06 10:06:00 PDT
Message edk at collab dot net writes:

> On Thu, Apr 05, 2001 at 10:21:54PM -0700, Daniel Rall wrote:
> > edk at collab dot net writes:
> >
> > > IMO, /bin/bash is better 'cause it's the shell for which the scripts are
> > > were written. On some operating systems, /bin/sh will not be the same
> > > as bash. Of course, designing for bash instead of sh may be somewhat
> > > problematic -- it seems that bash is not cross platform compatible,
> > > though sh is... <sigh>
> >
> > Bash is completely cross platform compatible. Bash 1.x is not
> > necessarily compatible with bash 2.x, however.
>
> Consider this:
>
> bash-2.03$ uname -s
> SunOS
> bash-2.03$ echo $SHELL
> /usr/bin/bash
> bash-2.03$ for i in ;
> bash: syntax error near unexpected token `;'
> bash-2.03$
>
> [edk@sc-dev2 publish]$ uname -s
> Linux
> [edk@sc-dev2 publish]$ echo $SHELL
> /bin/bash
> [edk@sc-dev2 publish]$ for i in ;
> > do
> > echo 1
> > done

That's what I said. Bash 1 is not fully compatible with bash2:

dlr@sc-dev2:dlr$ bash -version
GNU bash, version 1.14.7(1)

Bash1 is installed onto Linux boxes by default because it is a bit
more friendly than bash2.

> > Writing scripts for vanilla sh should solve most of our problems,
> > assuming we indeed have a lowest common denominator test environment.
>
> This sounds good to me. It does mean avoiding a few short cuts which
> bash provides, but nothing major (at least, nothing major which I've
> seen so far). Still, until we've done that, it seems fair to specify
> /bin/bash (IMO) ...

How hard is it to be sh compatible? I really have no idea, nor really
know how to test the compatibility.

Daniel

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

Re: [joist-dev] Re: [joist-cvs] CVS update: joist/build build.sh Daniel Rall <dlr at collab dot net> Daniel Rall <dlr at collab dot net> 2001-04-06 10:06:00 PDT
Messages per page: