On 05/04/13 13:23, Tom Browder wrote:
> ...
> 4. In file "/etc/profile.d/brlcad.sh" I check for non-zero-length
> PATH and MANPATH before using them:
>
> TPATH=/usr/brlcad/bin
> TMANPATH=/usr/brlcad/share/man
>
> if [ -z "$PATH" ] ; then
> PATH=$TPATH
> else
> PATH=${PATH}:${TPATH}:
> fi
> if [ -z "$MANPATH" ] ; then
> MANPATH=${TMANPATH}
> else
> MANPATH=${MANPATH}:${TMANPATH}
> fi
>
> export PATH
> export MANPATH
>
> I did that because I've had trouble before with Ubuntu if an env var
> is empty. I can't say for Debian distros, but I'm still assuming the
> above is better practice.
I'll change the way to set $MANPATH
Usually the $MANPATH is empty by default and is the 'manpath' command which
determine the paths for manuals.
If $MANPATH is set, 'manpath' will display ONLY this value rather than
determining it from '/etc/manpath.config' file. So setting $MANPATH as we do
now, will override the other system man paths.
If $MANPATH is set with a colon prefix, 'manpath' will determine it from
'/etc/manpath.config' and append the value of $MANPATH. If ends with colon,
'manpath' append the determined value from '/etc/manpath.config' to the
$MANPATH value.
So, if $MANPATH ends with colon, we've to add '/usr/brlcad/share/man:' if not
':/usr/brlcad/share/man', regardless if $MANPATH is empty or not.
Regards,
--
Jordi Sayol
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire
the most talented Cisco Certified professionals. Visit the
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel