2 ################################################################################
4 # File: $RCSfile: set_path,v $
5 # Revision: $Revision: 1.4 $
6 # Description: Sets the path from scratch
7 # Author: Andrew@DeFaria.com
8 # Created: Thu Jun 6 08:31:57 PDT 1996
9 # Modified: $Date: 2006/10/30 05:24:03 $
12 # (c) Copyright 2000-2005, Andrew@DeFaria.com, all rights reserved.
14 ################################################################################
15 function append_to_path {
18 if [ -d "$component" ]; then
19 if [ -z "$PATH" ]; then
22 PATH="$PATH:$component"
27 function append_to_manpath {
30 if [ -d "$component" ]; then
31 if [ -z "$MANPATH" ]; then
34 MANPATH="$MANPATH:$component"
39 if [ -x /app/manpath ]; then
42 for manpath in $(/app/manpath); do
43 manpath_dirs="$manpath_dirs $manpath"
51 if [ -f /etc/PATH ]; then
54 for path in $(cat /etc/PATH); do
55 path_dirs="$path_dirs $path"
60 if [ -x cygpath ]; then
61 home=$(cygpath -u $(cygpath -pws /home/Andrew\ DeFaria) | tr [:upper:] [:lower:])
66 if [ "$SYSTEMROOT" ]; then
67 systemroot=$(cygpath -u $SYSTEMROOT)
70 path_dirs="$path_dirs\
78 /opt/Rational/Clearcase/bin\
79 /opt/Rational/ClearQuest\
95 /opt/rational/clearcase/bin\
96 /opt/rational/clearcase/etc\
97 /opt/rational/clearquest/bin\
98 /opt/rational/clearquest\
105 $systemroot/System32\
116 /usr/local/packages/ccperl/ccperl5.001m/man\
117 /usr/local/packages/atria/current/man\
118 /usr/local/packages/emacs/man\
121 /opt/medusa/share/man\
126 for component in $path_dirs; do
127 append_to_path "$component"
131 if [ -f /etc/MANPATH ]; then
132 MANPATH=$(cat /etc/MANPATH)
135 for component in $manpath_dirs; do
136 append_to_manpath "$component"
140 if [ "hp-ux" = "10" ]; then
141 export SHLIB_PATH=$(cat /etc/SHLIB_PATH)
142 export SHLIB_PATH=$SHLIB_PATH:$M_LROOT/bin
143 export LD_LIBRARY_PATH=$SHLIB_PATH:$M_LROOT/bin