diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2012-06-11 15:19:18 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2012-06-11 15:19:18 +1200 |
commit | 8ea38fed5a6fda7e7975a19ba9815829ac6ba2eb (patch) | |
tree | af48a4bae5b467bfeb298dd0d35a7eb16a9e7f1b /bash/bash_profile | |
parent | Improve comment on prompt command. (diff) | |
download | dotfiles-8ea38fed5a6fda7e7975a19ba9815829ac6ba2eb.tar.gz dotfiles-8ea38fed5a6fda7e7975a19ba9815829ac6ba2eb.zip |
Fix overloading init scripts
Diffstat (limited to 'bash/bash_profile')
-rw-r--r-- | bash/bash_profile | 8 |
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. |