From 8ea38fed5a6fda7e7975a19ba9815829ac6ba2eb Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 11 Jun 2012 15:19:18 +1200 Subject: Fix overloading init scripts --- bash/bash_profile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bash/bash_profile') 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. -- cgit v1.2.3