f138ce3
diff -up gromacs-4.5.1/scripts/GMXRC.bash.cmakein.orig gromacs-4.5.1/scripts/GMXRC.bash.cmakein
f138ce3
--- gromacs-4.5.1/scripts/GMXRC.bash.cmakein.orig	2010-08-23 20:58:30.000000000 +0300
f138ce3
+++ gromacs-4.5.1/scripts/GMXRC.bash.cmakein	2010-10-25 17:11:05.955213941 +0300
f138ce3
@@ -8,8 +8,12 @@
f138ce3
 tmppath=""
f138ce3
 for i in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
f138ce3
   if test "$i" != "$GMXLDLIB"; then
f138ce3
+    if test "${tmppath}" == ""; then
f138ce3
+      tmppath=$i
f138ce3
+    else
f138ce3
     tmppath=${tmppath}:$i
f138ce3
   fi
f138ce3
+  fi
f138ce3
 done
f138ce3
 LD_LIBRARY_PATH=$tmppath
f138ce3
 
f138ce3
@@ -38,6 +42,9 @@ for i in `echo $MANPATH | sed "s/:/ /g"`
f138ce3
     tmppath=${tmppath}:$i
f138ce3
   fi
f138ce3
 done
f138ce3
+if test "$tmppath" == ""; then
f138ce3
+    tmppath=":"
f138ce3
+fi
f138ce3
 MANPATH=$tmppath
f138ce3
 
f138ce3
 ##########################################################
f138ce3
diff -up gromacs-4.5.1/scripts/GMXRC.bash.in.orig gromacs-4.5.1/scripts/GMXRC.bash.in
f138ce3
--- gromacs-4.5.1/scripts/GMXRC.bash.in.orig	2010-08-23 20:58:30.000000000 +0300
f138ce3
+++ gromacs-4.5.1/scripts/GMXRC.bash.in	2010-10-25 17:11:05.955213941 +0300
f138ce3
@@ -8,8 +8,12 @@
f138ce3
 tmppath=""
f138ce3
 for i in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
f138ce3
   if test "$i" != "$GMXLDLIB"; then
f138ce3
+    if test "${tmppath}" == ""; then
f138ce3
+      tmppath=$i
f138ce3
+    else
f138ce3
     tmppath=${tmppath}:$i
f138ce3
   fi
f138ce3
+  fi
f138ce3
 done
f138ce3
 LD_LIBRARY_PATH=$tmppath
f138ce3
 
f138ce3
@@ -38,6 +42,9 @@ for i in `echo $MANPATH | sed "s/:/ /g"`
f138ce3
     tmppath=${tmppath}:$i
f138ce3
   fi
f138ce3
 done
f138ce3
+if test "$tmppath" == ""; then
f138ce3
+    tmppath=":"
f138ce3
+fi
f138ce3
 MANPATH=$tmppath
f138ce3
 
f138ce3
 ##########################################################
f138ce3
diff -up gromacs-4.5.1/scripts/GMXRC.csh.cmakein.orig gromacs-4.5.1/scripts/GMXRC.csh.cmakein
f138ce3
--- gromacs-4.5.1/scripts/GMXRC.csh.cmakein.orig	2010-08-23 20:58:30.000000000 +0300
f138ce3
+++ gromacs-4.5.1/scripts/GMXRC.csh.cmakein	2010-10-25 17:11:05.955213941 +0300
f138ce3
@@ -16,7 +16,13 @@ if (! $?GMXMAN) setenv GMXMAN ""
f138ce3
 # remove previous gromacs part from ld_library_path
f138ce3
 set tmppath = ""
f138ce3
 foreach i ( `echo $LD_LIBRARY_PATH | sed "s/:/ /g"` )
f138ce3
-  if ( "$i" != "$GMXLDLIB" ) set tmppath = "${tmppath}:$i"
f138ce3
+  if ( "$i" != "$GMXLDLIB" ) then
f138ce3
+    if ("${tmppath}" == "") then
f138ce3
+      set tmppath = "$i"
f138ce3
+    else
f138ce3
+      set tmppath = "${tmppath}:$i"
f138ce3
+    endif
f138ce3
+  endif
f138ce3
 end
f138ce3
 setenv LD_LIBRARY_PATH $tmppath
f138ce3
 
f138ce3
@@ -39,6 +45,9 @@ set tmppath = ""
f138ce3
 foreach i ( `echo $MANPATH | sed "s/:/ /g"` )
f138ce3
   if ( "$i" != "$GMXMAN" ) set tmppath = "${tmppath}:$i"
f138ce3
 end
f138ce3
+if ("$tmppath" == "") then
f138ce3
+    set tmppath = ":"
f138ce3
+endif
f138ce3
 setenv MANPATH $tmppath
f138ce3
 
f138ce3
 ##########################################################
f138ce3
diff -up gromacs-4.5.1/scripts/GMXRC.csh.in.orig gromacs-4.5.1/scripts/GMXRC.csh.in
f138ce3
--- gromacs-4.5.1/scripts/GMXRC.csh.in.orig	2010-08-23 20:58:30.000000000 +0300
f138ce3
+++ gromacs-4.5.1/scripts/GMXRC.csh.in	2010-10-25 17:11:05.955213941 +0300
f138ce3
@@ -16,7 +16,13 @@ if (! $?GMXMAN) setenv GMXMAN ""
f138ce3
 # remove previous gromacs part from ld_library_path
f138ce3
 set tmppath = ""
f138ce3
 foreach i ( `echo $LD_LIBRARY_PATH | sed "s/:/ /g"` )
f138ce3
-  if ( "$i" != "$GMXLDLIB" ) set tmppath = "${tmppath}:$i"
f138ce3
+  if ( "$i" != "$GMXLDLIB" ) then
f138ce3
+    if ("${tmppath}" == "") then
f138ce3
+      set tmppath = "$i"
f138ce3
+    else
f138ce3
+      set tmppath = "${tmppath}:$i"
f138ce3
+    endif
f138ce3
+  endif
f138ce3
 end
f138ce3
 setenv LD_LIBRARY_PATH $tmppath
f138ce3
 
f138ce3
@@ -39,6 +45,9 @@ set tmppath = ""
f138ce3
 foreach i ( `echo $MANPATH | sed "s/:/ /g"` )
f138ce3
   if ( "$i" != "$GMXMAN" ) set tmppath = "${tmppath}:$i"
f138ce3
 end
f138ce3
+if ("$tmppath" == "") then
f138ce3
+    set tmppath = ":"
f138ce3
+endif
f138ce3
 setenv MANPATH $tmppath
f138ce3
 
f138ce3
 ##########################################################
f138ce3
diff -up gromacs-4.5.1/scripts/GMXRC.zsh.cmakein.orig gromacs-4.5.1/scripts/GMXRC.zsh.cmakein
f138ce3
--- gromacs-4.5.1/scripts/GMXRC.zsh.cmakein.orig	2010-08-23 20:58:30.000000000 +0300
f138ce3
+++ gromacs-4.5.1/scripts/GMXRC.zsh.cmakein	2010-10-25 17:11:05.955213941 +0300
f138ce3
@@ -8,8 +8,12 @@
f138ce3
 tmppath=""
f138ce3
 for i in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
f138ce3
   if test "$i" != "$GMXLDLIB"; then
f138ce3
+    if test "${tmppath}" = ""; then
f138ce3
+      tmppath=$i
f138ce3
+    else
f138ce3
     tmppath=${tmppath}:$i
f138ce3
   fi
f138ce3
+  fi
f138ce3
 done
f138ce3
 LD_LIBRARY_PATH=$tmppath
f138ce3
 
f138ce3
@@ -38,6 +42,9 @@ for i in `echo $MANPATH | sed "s/:/ /g"`
f138ce3
     tmppath=${tmppath}:$i
f138ce3
   fi
f138ce3
 done
f138ce3
+if test "$tmppath" = ""; then
f138ce3
+    tmppath=":"
f138ce3
+fi
f138ce3
 MANPATH=$tmppath
f138ce3
 
f138ce3
 ##########################################################
f138ce3
diff -up gromacs-4.5.1/scripts/GMXRC.zsh.in.orig gromacs-4.5.1/scripts/GMXRC.zsh.in
f138ce3
--- gromacs-4.5.1/scripts/GMXRC.zsh.in.orig	2010-08-23 20:58:30.000000000 +0300
f138ce3
+++ gromacs-4.5.1/scripts/GMXRC.zsh.in	2010-10-25 17:11:05.955213941 +0300
f138ce3
@@ -8,8 +8,12 @@
f138ce3
 tmppath=""
f138ce3
 for i in `echo $LD_LIBRARY_PATH | sed "s/:/ /g"`; do
f138ce3
   if test "$i" != "$GMXLDLIB"; then
f138ce3
+    if test "${tmppath}" = ""; then
f138ce3
+      tmppath=$i
f138ce3
+    else
f138ce3
     tmppath=${tmppath}:$i
f138ce3
   fi
f138ce3
+  fi
f138ce3
 done
f138ce3
 LD_LIBRARY_PATH=$tmppath
f138ce3
 
f138ce3
@@ -38,6 +42,9 @@ for i in `echo $MANPATH | sed "s/:/ /g"`
f138ce3
     tmppath=${tmppath}:$i
f138ce3
   fi
f138ce3
 done
f138ce3
+if test "$tmppath" = ""; then
f138ce3
+    tmppath=":"
f138ce3
+fi
f138ce3
 MANPATH=$tmppath
f138ce3
 
f138ce3
 ##########################################################