bashisms and linuxisms in GNOME



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`

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".

I'm sorry not to use a linux system



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