1 # zsh configuration file for Gromacs
2 # First we remove old gromacs stuff from the paths
3 # by selecting everything else.
4 # This is not 100% necessary, but very useful when we
5 # repeatedly switch between gmx versions in a shell.
7 # First remove gromacs part of ld_library_path
9 for i
in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
10 if test "$i" != "$GMXLDLIB"; then
11 if test "${tmppath}" = ""; then
18 LD_LIBRARY_PATH
=$tmppath
20 # First remove gromacs part of PKG_CONFIG_PATH
22 for i
in `echo $PKG_CONFIG_PATH | sed "s/:/ /g"`; do
23 if test "$i" != "$GMXLDLIB/pkgconfig"; then
27 PKG_CONFIG_PATH
=$tmppath
29 # remove gromacs part of path
31 for i
in `echo $PATH | sed "s/:/ /g"`; do
32 if test "$i" != "$GMXBIN"; then
38 # and remove the gmx part of manpath
40 for i
in `echo $MANPATH | sed "s/:/ /g"`; do
41 if test "$i" != "$GMXMAN"; then
45 if test "$tmppath" = ""; then
50 ##########################################################
51 # This is the real configuration part. We save the Gromacs
52 # things in separate vars, so we can remove them later.
53 # If you move gromacs, change the next four line.
54 ##########################################################
55 export GMXBIN
=@bindir@
56 export GMXLDLIB
=@libdir@
57 export GMXMAN
=@mandir@
58 export GMXDATA
=@datadir@
60 # NB: The variables already begin with ':' now, or are empty
61 export LD_LIBRARY_PATH
=${GMXLDLIB}${LD_LIBRARY_PATH}
62 export PKG_CONFIG_PATH
=${GMXLDLIB}/pkgconfig
${PKG_CONFIG_PATH}
63 export PATH
=${GMXBIN}${PATH}
64 export MANPATH
=${GMXMAN}${MANPATH}
66 # read zsh completions if understand how to use them
67 if compctl
>& /dev
/null
; then
68 if [ -f $GMXBIN/completion.zsh
]; then
69 source $GMXBIN/completion.zsh
;