aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_profile
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2012-06-11 15:19:18 +1200
committerTom Ryder <tom@sanctum.geek.nz>2012-06-11 15:19:18 +1200
commit8ea38fed5a6fda7e7975a19ba9815829ac6ba2eb (patch)
treeaf48a4bae5b467bfeb298dd0d35a7eb16a9e7f1b /bash/bash_profile
parentImprove comment on prompt command. (diff)
downloaddotfiles-8ea38fed5a6fda7e7975a19ba9815829ac6ba2eb.tar.gz
dotfiles-8ea38fed5a6fda7e7975a19ba9815829ac6ba2eb.zip
Fix overloading init scripts
Diffstat (limited to 'bash/bash_profile')
-rw-r--r--bash/bash_profile8
1 files changed, 7 insertions, 1 deletions
diff --git a/bash/bash_profile b/bash/bash_profile
index 46564da0..85ef5e21 100644
--- a/bash/bash_profile
+++ b/bash/bash_profile
@@ -8,7 +8,13 @@ DIRS="${HOME}/bin
/usr/local/nagios/bin
/usr/local/pgsql/bin"
for DIR in $DIRS; do
- [[ -d "$DIR" ]] && PATH="${DIR}:${PATH}"
+ if [[ -d "$DIR" ]] && [[ ":${PATH}:" != *":${DIR}:"* ]]; then
+ if [[ -n "$PATH" ]]; then
+ PATH="${DIR}:${PATH}"
+ else
+ PATH=$DIR
+ fi
+ fi
done
# None of this UTF8 drawing characters nonsense.