]> git.wh0rd.org Git - home.git/commitdiff
smarter PATH handling
authorMike Frysinger <vapier@gentoo.org>
Fri, 30 Jan 2009 21:47:18 +0000 (16:47 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 28 Apr 2012 19:36:06 +0000 (15:36 -0400)
.bashrc

diff --git a/.bashrc b/.bashrc
index e97e7472d4c63e3051bf93f65838e824c5feea65..3433e4da23abdbc8f9a19fa2da3aca11079210b2 100644 (file)
--- a/.bashrc
+++ b/.bashrc
@@ -3,9 +3,13 @@ umask 0022
 for sh in ~/.profile.d/*.sh ; do
        . "$sh"
 done
+unset sh
 
-export PATH=/usr/lib/ccache/bin:/sbin:/usr/sbin:${PATH}:/usr/games/bin
-[ -e ~/.bin ] && export PATH=${PATH}:~/.bin
+export PATH=/sbin:/usr/sbin:${PATH}:/usr/games/bin
+for p in /usr/lib*/ccache /usr/lib*/ccache/*/ ~/.bin/ ; do
+       [ -d "${p}" ] && export PATH=${p}:$PATH
+done
+unset p
 
 export ECHANGELOG_USER="Mike Frysinger <vapier@gentoo.org>"
 export GCC_BOUNDS_OPTS=-no-message