Many scripts have in them something like

if [ $SAGE64 = "yes" -a $UNAME = "Darwin" ] ; then
   some code
fi

Where the '-a' means 'AND'.

The use of the '-a' option is deprecated by both by the 2004
http://www.opengroup.org/onlinepubs/009695399/utilities/test.html

and 2008
http://www.opengroup.org/onlinepubs/9699919799/utilities/test.html

POSIX standards. (Possibly earlier standards too).

The above should be written as

if [ $SAGE64 = "yes" ] && [ $UNAME = "Darwin" ] ; then
   CFLAGS = "$CFLAGS -m64"
fi

(Actually, this SAGE64 and Darwin is one bit of code I really dislike, but that 
is only an issue for portability to Solaris, nothing to do with the test.)

Likewise, the -o option is too, so

test expr1 -o expr2

should be replaced by

test expr1 || test expr2

I'm not suggesting everyone convert all their scripts, but when writing them, 
it 
would be wise to bear that in mind. The rationale for preferring the && or || 
operator is explained in the documents I linked above.


Dave

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to