Converted to use preppath
This commit is contained in:
parent
76e91685a0
commit
30bf3ab35f
38
.zshenv
38
.zshenv
|
@ -35,40 +35,18 @@ then
|
||||||
. /etc/oraenv
|
. /etc/oraenv
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set PATH to direcories *I* want.
|
if whence preppath > /dev/null
|
||||||
PRIVATE_PATH=$HOME/bin/hosts:$HOME/bin/scripts:$HOME/bin:$HOME/public_html/bin:$HOME/pgreplica/bin
|
then
|
||||||
ETC_PATH=/usr/sbin:/sbin:/opt/omni/sbin:/opt/omni/lbin:/var/qmail/bin:/usr/local/ssl/bin:/usr/adm/acct/wsr/bin:/opt/tusc/bin:/usr/local/pgsql/bin
|
|
||||||
LOCAL_PATH=/usr/local/arm-linux/bin:/usr/local/sbin:/usr/local/samba/bin:/usr/local/bin:/usr/local/bin/X11:/usr/local/povray3/bin:/usr/local/majordomo/bin:/usr/lib/majordomo/bin:/usr/local/vnc_x86_linux_2.0:/usr/local/rrdtool-1.0.35/bin:/usr/local/OpenOffice.org1.0.2/program
|
|
||||||
BIN_PATH=/usr/bin/X11:/bin:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/opt/kde/bin:/opt/perl5/bin:/opt/Office51/bin:/usr/games:/usr/contrib/bin
|
|
||||||
ORACLE_PATH=$ORACLE_HOME/bin
|
|
||||||
|
|
||||||
if [ -r /etc/PATH ]
|
if [ -r /etc/PATH ]
|
||||||
then
|
then
|
||||||
PATH=`cat /etc/PATH`:$PATH
|
PATH=$(preppath $(cat /etc/PATH) )
|
||||||
fi
|
fi
|
||||||
|
PATH=`preppath -c $ORACLE_HOME/bin`
|
||||||
ALL_PATH=$PRIVATE_PATH:$LOCAL_PATH:$ETC_PATH:$BIN_PATH:$ORACLE_PATH:$PATH
|
PATH=`preppath -c /usr/bin/X11:/bin:/usr/bin:/usr/ccs/bin:/usr/openwin/bin:/opt/kde/bin:/opt/perl5/bin:/opt/Office51/bin:/usr/games:/usr/contrib/bin`
|
||||||
NEW_PATH=""
|
PATH=`preppath -c /usr/local/arm-linux/bin:/usr/local/sbin:/usr/local/samba/bin:/usr/local/bin:/usr/local/bin/X11:/usr/local/povray3/bin:/usr/local/majordomo/bin:/usr/lib/majordomo/bin:/usr/local/vnc_x86_linux_2.0:/usr/local/rrdtool-1.0.35/bin:/usr/local/OpenOffice.org1.0.2/program`
|
||||||
|
PATH=`preppath -c /usr/sbin:/sbin:/opt/omni/sbin:/opt/omni/lbin:/var/qmail/bin:/usr/local/ssl/bin:/usr/adm/acct/wsr/bin:/opt/tusc/bin:/usr/local/pgsql/bin`
|
||||||
for i in ${(s/:/)ALL_PATH}
|
PATH=`preppath -c $HOME/bin/hosts:$HOME/bin/scripts:$HOME/bin:$HOME/public_html/bin:$HOME/pgreplica/bin`
|
||||||
do
|
|
||||||
if test -d "$i"
|
|
||||||
then
|
|
||||||
case "$NEW_PATH" in
|
|
||||||
$i:*|*:$i|*:$i:*) ;;
|
|
||||||
*)
|
|
||||||
if test -z "$NEW_PATH"
|
|
||||||
then
|
|
||||||
NEW_PATH=$i
|
|
||||||
else
|
|
||||||
NEW_PATH=$NEW_PATH:$i
|
|
||||||
fi
|
fi
|
||||||
esac
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
export PATH=$NEW_PATH
|
|
||||||
|
|
||||||
|
|
||||||
if [ -r /etc/MANPATH ]
|
if [ -r /etc/MANPATH ]
|
||||||
then
|
then
|
||||||
|
|
Loading…
Reference in New Issue