From: Erik Lindahl Date: Sun, 30 Dec 2012 11:28:52 +0000 (+0100) Subject: Fixed GMXRC so we are not polluting standard shell variables X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=a0dca2211d374df796a438a4e1c4941a3a55c8a9;p=alexxy%2Fgromacs.git Fixed GMXRC so we are not polluting standard shell variables csh/tcsh is now detected by looking for the lower-case $shell variable, which seems to work on all recent platforms, instead of using the 'set' command (which affected $* and $@ in bash). Fixes #1044. Change-Id: I852d075c80e2bf8f81a02932432dd31b3bab7f09 --- diff --git a/scripts/GMXRC.cmakein b/scripts/GMXRC.cmakein index de457e2b1b..b57659a949 100644 --- a/scripts/GMXRC.cmakein +++ b/scripts/GMXRC.cmakein @@ -5,9 +5,8 @@ # If you only use one shell you can copy that GMXRC.* instead. -# only csh/tcsh understand 'set' -set is_csh = 123 -test "$is_csh" = 123 && goto CSH +# only csh/tcsh set the variable $shell (note: lower case!) +test $shell && goto CSH # if we got here, shell is bsh/bash/zsh/ksh # bsh cannot remove part of a variable with %%