From e0f9fe6481f4fc24a8acb9adad29d627171239fd Mon Sep 17 00:00:00 2001 From: tfheen Date: Sat, 18 Oct 2003 14:47:32 +0000 Subject: [PATCH] add removepathelem and also explicitly remove "." from PATH for stupid sites where that is added. git-svn-id: file:///svn/tfheen/trunk/dotfiles@199 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- environment | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/environment b/environment index eaeeb32..8145595 100644 --- a/environment +++ b/environment @@ -17,16 +17,20 @@ is_debian () { return 1 } +removepathelem () { + PATH=$(echo "$PATH" | sed -e "s,:*$1:,:,g") +} + setpathifdir () { if [ -d "$1" ]; then - local NP=$(echo "$PATH" | sed -e "s,:*$1:,:,g") + removepathelem "$1" PATH="$1:$NP" fi } appendpathifdir () { if [ -d "$1" ]; then - local NP=$(echo "$PATH" | sed -e "s,:*$1:,:,g") + removepathelem "$1" PATH="$NP:$1" fi } @@ -117,6 +121,7 @@ case "$DOMAINNAME" in ;; esac +removepathelem "." export LS_OPTIONS CVSROOT EDITOR TZ WWW_HOME LESSOPEN LESS RSYNC_RSH export CVS_RSH PILOTPORT PILOTRATE LANG DEBEMAIL CVSEDITOR ldlib -- 2.39.5