Re: bashisms and linuxisms in GNOME



On Tue, 15 Sep 1998, Frederic Devernay wrote:

> Quite often, bashisms and linuxisms appear in  GNOME...
> I think bash, when invoked ans /bin/sh, should follow strictly the
> Bourne shell, and not add any "extension", such as in
> libgtop/LIBGTOP-VERSION:
> 
> LIBGTOP_VERSION_CODE=$(($LIBGTOP_MAJOR_VERSION*1000000+$LIBGTOP_MINOR_VERSION*1000+$LIBGTOP_MICRO_VERSION))
> 
> which is bash, ksh, but not Bourne shell, sorry, you'll have to use
> "expr":
> 
> LIBGTOP_VERSION_CODE=`expr
> $LIBGTOP_MAJOR_VERSION*1000000+$LIBGTOP_MINOR_VERSION*1000+$LIBGTOP_MICRO_VERSION`

Thanks for the bug report. Just changed this in CVS.

> another one which appears frequently is the "ln -sf" linuxism. The -f
> option is not standard, and something like "ln -sf main.html index.html"
> should be written "rm -f main.html; ln -s main.html index.html".

Well, I think we should better use $(LN_S) and check for in in
configure.in - some systems do not even support symbolic links.

Martin

-----------------------------------------------------------------
   Martin Baulig - Angewandte Mathematik - Universitaet Trier

   baulig@castor.uni-trier.de, http://www.home-of-linux.org/
   Key: 1024-bit key with ID C8178435 created 1997/01/24 
   ID:  67 C1 84 A0 47 F5 11 C5  5F 68 4C 84 99 05 C3 92
   Finger me for public key or fetch finger.txt from the url above
------------------------------------------------------------------



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]