iccvars_env.sh/ifortvars_env.sh setup script errors

iccvars_env.sh/ifortvars_env.sh setup script errors

What is the correct place to report bugs in the setup scripts for the 11.1.064 redistributable libraries packages?

I was trying to test the iccvars_env.sh and ifortvars_env.sh scripts generated by the install.sh scripts, and realized that they have a bug. The initial code is:


if [ -n $1 ]; then
ARCH=$1
else
ARCH="ia32"
echo "Architecture defaulted to 'ia32'"
echo "Invoke script $0 with ia32, ia64, or intel64 for specific choice"
fi

The problem is, because the $1 in the if check is not quoted if no parameter is passed when the script is sourced the statement will parse to

if [ -n  ]; then

I'm not sure why bash doesn't complain with a syntax error, but very simple tests will show that regardless of what is passed the script will never take the else clause. In both scripts the first statement should read


if [ -n "$1" ]; then

Note that I tested the csh versions and they work correctly. If you
don't pass something it defaults to ia32 and echos the default warning.

It seems strange to me that this hasn't been noticed before, so feel free to point out where I've gone wrong (if I have.)

Mark E. Hamilton
GAITS, Inc.



1 contenuto / 0 nuovi
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione