On Wed, Jan 17, 2007 at 10:06:26AM +0000, Ignacio Fernández Galván wrote: > > I don't know if it works differently for other versions of man/bash, > but in my case, if MANPATH is empty, changing it to something else > without adding an empty string is not nice.
Yes, this is so. I think the cleanest possibility would be to set the
path using manpath(1) rather than $MANPATH, like this:
--- gromacs-3.3.1/scripts/GMXRC.bash 2007-01-17 09:30:00.697904526 +0100
+++ gromacs-3.3.1-mine/scripts/GMXRC.bash 2007-01-17 14:51:36.838276115
+0100
@@ -24,7 +24,7 @@
# and remove the gmx part of manpath
tmppath=""
-for i in `echo $MANPATH | sed "s/:/ /g"`; do
+for i in `eval manpath 2>/dev/null | sed "s/:/ /g"`; do
if test "$i" != "$GMXMAN"; then
tmppath=${tmppath}:$i
fi
--- gromacs-3.3.1/scripts/GMXRC.bash.in 2001-08-18 13:07:31.000000000 +0200
+++ gromacs-3.3.1-mine/scripts/GMXRC.bash.in 2007-01-17 14:51:56.128925785
+0100
@@ -24,7 +24,7 @@
# and remove the gmx part of manpath
tmppath=""
-for i in `echo $MANPATH | sed "s/:/ /g"`; do
+for i in `eval manpath 2>/dev/null | sed "s/:/ /g"`; do
if test "$i" != "$GMXMAN"; then
tmppath=${tmppath}:$i
fi
A.
--
Ansgar Esztermann
Researcher & Sysadmin
http://www.mpibpc.mpg.de/groups/grubmueller/start/people/aeszter/index.shtml
pgpwGld47vdj4.pgp
Description: PGP signature
_______________________________________________ gmx-users mailing list [email protected] http://www.gromacs.org/mailman/listinfo/gmx-users Please don't post (un)subscribe requests to the list. Use the www interface or send it to [EMAIL PROTECTED] Can't post? Read http://www.gromacs.org/mailing_lists/users.php

