A freeze group can now be allowed to move rigidly in some dimension by using "freezed...
[gromacs/rigid-bodies.git] / scripts / GMXRC.cmakein
blobde457e2b1b8b7a0921b3bada649bc0b3556af23b
1 # This is a convenience script to determine which
2 # type of shell you have, and then run GMXRC.[csh|bash|zsh]
3 # from the Gromacs binary directory.
5 # If you only use one shell you can copy that GMXRC.* instead.
8 # only csh/tcsh understand 'set'
9 set is_csh = 123
10 test "$is_csh" = 123 && goto CSH
12 # if we got here, shell is bsh/bash/zsh/ksh
13 # bsh cannot remove part of a variable with %%
14 shtst="A.B"
15 if [ "`(echo ${shtst%%.*}) 2>/dev/null`" = A ]; then
17   # shell is bash/zsh/ksh
18   # bash/zsh use $[...] for arithmetic evaluation, ksh doesn't
19   if [ "`echo $[0+1]`" = 1 ]; then
20     
21     # shell is zsh/bash
22     # zsh can test if the variable shtst is set with ${+shtst}
23     if [ "`(echo ${+shtst}) 2>/dev/null`" = 1 ]; then
24       # shell is zsh
25       source @BIN_INSTALL_DIR@/GMXRC.zsh
26     else  
27       # shell is bash
28       source @BIN_INSTALL_DIR@/GMXRC.bash      
29     fi
31   else    
32     # shell is ksh - use bash setup, completions won't be read.
33      . @BIN_INSTALL_DIR@/GMXRC.bash
34   fi
35   return
36 else
37   # shell is bsh - use bash setup, completions won't be read.
38   . @BIN_INSTALL_DIR@/GMXRC.bash
39   exit
42 # csh/tcsh jump here
44 CSH:
45 source @BIN_INSTALL_DIR@/GMXRC.csh