Fix message about incorrect usage of dihedral type 9
[alexxy/gromacs.git] / scripts / GMXRC.cmakein
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.
4 #
5 # If you only use one shell you can copy that GMXRC.* instead.
6
7
8 # only csh/tcsh set the variable $shell (note: lower case!)
9 test $shell && goto CSH
10
11 # if we got here, shell is bsh/bash/zsh/ksh
12 # bsh cannot remove part of a variable with %%
13 shtst="A.B"
14 if [ "`(echo ${shtst%%.*}) 2>/dev/null`" = A ]; then
15
16   # shell is bash/zsh/ksh
17   # bash/zsh use $[...] for arithmetic evaluation, ksh doesn't
18   if [ "`echo $[0+1]`" = 1 ]; then
19     
20     # shell is zsh/bash
21     # zsh can test if the variable shtst is set with ${+shtst}
22     if [ "`(echo ${+shtst}) 2>/dev/null`" = 1 ]; then
23       # shell is zsh
24       source @BIN_INSTALL_DIR@/GMXRC.zsh
25     else  
26       # shell is bash
27       source @BIN_INSTALL_DIR@/GMXRC.bash      
28     fi
29
30   else    
31     # shell is ksh - use bash setup, completions won't be read.
32      . @BIN_INSTALL_DIR@/GMXRC.bash
33   fi
34   return
35 else
36   # shell is bsh - use bash setup, completions won't be read.
37   . @BIN_INSTALL_DIR@/GMXRC.bash
38   exit
39 fi
40
41 # csh/tcsh jump here
42
43 CSH:
44 source @BIN_INSTALL_DIR@/GMXRC.csh
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62