Merge release-4-6 into master
[alexxy/gromacs.git] / scripts / GMXRC.cmakein
index b57659a9495927e3e7b38ecb9060f5a182907956..bc5f737fba02a62c080b97ccee65776302071f56 100644 (file)
@@ -9,37 +9,10 @@
 test $shell && goto CSH
 
 # if we got here, shell is bsh/bash/zsh/ksh
-# bsh cannot remove part of a variable with %%
-shtst="A.B"
-if [ "`(echo ${shtst%%.*}) 2>/dev/null`" = A ]; then
-
-  # shell is bash/zsh/ksh
-  # bash/zsh use $[...] for arithmetic evaluation, ksh doesn't
-  if [ "`echo $[0+1]`" = 1 ]; then
-    
-    # shell is zsh/bash
-    # zsh can test if the variable shtst is set with ${+shtst}
-    if [ "`(echo ${+shtst}) 2>/dev/null`" = 1 ]; then
-      # shell is zsh
-      source @BIN_INSTALL_DIR@/GMXRC.zsh
-    else  
-      # shell is bash
-      source @BIN_INSTALL_DIR@/GMXRC.bash      
-    fi
-
-  else    
-    # shell is ksh - use bash setup, completions won't be read.
-     . @BIN_INSTALL_DIR@/GMXRC.bash
-  fi
-  return
-else
-  # shell is bsh - use bash setup, completions won't be read.
-  . @BIN_INSTALL_DIR@/GMXRC.bash
-  exit
-fi
+. @BIN_INSTALL_DIR@/GMXRC.bash
+return
 
 # csh/tcsh jump here
-
 CSH:
 source @BIN_INSTALL_DIR@/GMXRC.csh