aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_profile
diff options
context:
space:
mode:
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.