Re: Illegal option --
"James B. Byrne via Aubit4gl-discuss" <[email protected]> Wed, 13 Jan 2021 10:12:34 -0500
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <[email protected]> |
On Wed, January 13, 2021 05:17, Mike Aubury wrote: > This comes from the "aubit" command its using > .. > sh --version > .. > Illegal option -- > > > In general - I *never* use this command > I always just set the environment > > AUBITDIR=/usr/home/aubit4gl/Projects/aubit4glsrc > export AUBITDIR > export PATH=$PATH:$AUBITDIR/bin > export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$AUBITDIR/lib > > > On Tue, 12 Jan 2021 at 20:41, James B. Byrne via Aubit4gl-discuss < > [email protected]> wrote: > >> When I run this test by hand then I see this error: >> >> /home/byrnejb_hll/Projects/aubit4gl/bin/aubit 4glpc -fPIC -DPIC >> -ofile.4ae >> file.4gl -L/usr/local/lib -L/usr/lib >> Illegal option -- >> This is a bit of a kludge but it gets rid of the -- error and otherwise seems not to change the behaviour of the script: --- /home/byrnejb_hll/Projects/aubit4gl/bin/aubit 2021-01-13 10:02:43.596556000 -0500 +++ /home/byrnejb_hll/Projects/aubit4gl/bin/aubit.freebsd 2021-01-13 10:06:29.809377000 -0500 @@ -5203,10 +5203,15 @@ function check_bash () { + OS_NAME=`uname` BASH_VER=`bash --version | head -1 | awk '{print $4}'` DASH_VER=`dash --version 2> /dev/null | head -1 | awk '{print $4}'` - SH_VER=`sh --version < /dev/null | head -1 | awk '{print $4}'` - + if test "$OS_NAME" != "FreeBSD" ; then + SH_VER=`sh --version < /dev/null | head -1 | awk '{print $4}'` + else + SH_VER="FreeBSD" + fi + if test "$BASH_VER" != "$SH_VER" -a "$DASH_VER" != "$SH_VER" ; then warning "Your 'sh' executable is NOT the same as 'bash'. This may cause problems" fi -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail Unencrypted messages have no legal claim to privacy Do NOT open attachments nor follow links sent by e-Mail James B. Byrne mailto:[email protected] Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3