From fdeca4a9bea571714f16712d34f873bdafd94d42 Mon Sep 17 00:00:00 2001 From: Teemu Murtola Date: Mon, 30 Dec 2013 19:05:52 +0200 Subject: [PATCH] More robust shell detection in GMXRC To cater for environments that set $shell for a non-csh shell, also check the contents of the variable. Fixes #1213 Change-Id: I9135b947529b690a733ea0d7be5e8e507236a735 --- scripts/GMXRC.cmakein | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/GMXRC.cmakein b/scripts/GMXRC.cmakein index de92be9ab0..1ecf954885 100644 --- a/scripts/GMXRC.cmakein +++ b/scripts/GMXRC.cmakein @@ -4,9 +4,10 @@ # # If you only use one shell you can copy that GMXRC.* instead. - # only csh/tcsh set the variable $shell (note: lower case!) -test $shell && goto CSH +# but check for the contents to be sure, since some environments may +# set it also for other shells +echo $shell | grep -q csh && goto CSH # if we got here, shell is bsh/bash/zsh/ksh . @CMAKE_INSTALL_PREFIX@/@BIN_INSTALL_DIR@/GMXRC.bash -- 2.22.0