No, if you want to use bash, you have to build-depends on it and call it
explicitely (and not /bin/sh).
/bin/sh is a symlink to any POSIX compliant shell (like dash), not to
a Bourn compatible shell.

Hi Julien,

The script in question is POSIX compliant.  In fact it is Bourne-compliant,
which is much more restrictive.  This is the code in question:

   if test -z "$top_srcdir" || test ! -d "$top_srcdir"; then
       echo "NOTICE:  Setting top_srcdir to .." >&2
       top_srcdir=..
   fi
   if test ! -f $top_srcdir/VERSION ; then
       echo "error $top_srcdir/VERSION file missing" >&2
       kill -TERM $AG_pid
   fi
   f="`egrep '^AG_'  $top_srcdir/VERSION`"
   eval "$f" > /dev/null
   echo $AG_VERSION

I've built dash and then run an experiment:

$ export top_srcdir=$PWD
$ cd agen5/
$ $dash <<\_EOF_
set -x
    if test -z "$top_srcdir" || test ! -d "$top_srcdir"; then
        echo "NOTICE:  Setting top_srcdir to .." >&2
        top_srcdir=..
    fi
    if test ! -f $top_srcdir/VERSION ; then
        echo "error $top_srcdir/VERSION file missing" >&2
        kill -TERM $AG_pid
    fi
    f="`egrep '^AG_'  $top_srcdir/VERSION`"
    eval "$f" > /dev/null
    echo $AG_VERSION
_EOF_
+ test -z /home/bkorb/ag/rel/rel5.8.4/autogen-5.8.4
+ test ! -d /home/bkorb/ag/rel/rel5.8.4/autogen-5.8.4
+ test ! -f /home/bkorb/ag/rel/rel5.8.4/autogen-5.8.4/VERSION
+ egrep ^AG_ /home/bkorb/ag/rel/rel5.8.4/autogen-5.8.4/VERSION
+ f=AG_MAJOR_VERSION=5
AG_MINOR_VERSION=8
AG_REVISION=$AG_MAJOR_VERSION.$AG_MINOR_VERSION
AG_PATCHLEVEL=".4"
AG_VERSION=$AG_REVISION$AG_PATCHLEVEL
+ eval AG_MAJOR_VERSION=5
AG_MINOR_VERSION=8
AG_REVISION=$AG_MAJOR_VERSION.$AG_MINOR_VERSION
AG_PATCHLEVEL=".4"
AG_VERSION=$AG_REVISION$AG_PATCHLEVEL
+ AG_MAJOR_VERSION=5
+ AG_MINOR_VERSION=8
+ AG_REVISION=5.8
+ AG_PATCHLEVEL=.4
+ AG_VERSION=5.8.4
+ echo 5.8.4
5.8.4

So, you are having some sort of problem, but it has been mischaracterized.
It is not due to shell script syntax.

Regards, Bruce


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to