X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/ad191f4eb0a643961acfd7cee6e558fef9236eab..b35a9c3627940e12b131daf8e84068b0c39e132f:/dot/bash_profile diff --git a/dot/bash_profile b/dot/bash_profile index e45fe41..513f754 100644 --- a/dot/bash_profile +++ b/dot/bash_profile @@ -19,7 +19,7 @@ cd $HOME # --- Add elements to a path string --- __mdw_addto () { - local var=$1 val dir=$2 new="" + local var=$1 val dir=$2 new="" change=nil eval "val=\$$var" shift 2 for i in "$@"; do @@ -27,7 +27,7 @@ __mdw_addto () { [ -d $i ] || continue case "X$val" in X) - val=$i + val=$i change=t continue ;; X$i) @@ -43,13 +43,13 @@ __mdw_addto () { val=${val%:$i} ;; esac - new=$new:$i + new=$new:$i change=t done case $dir in l) val=${new#:}:$val;; r) val=$val$new;; esac - export $var=$val + case $change in t) export $var="$val" ;; esac } # --- Set the path variable --- @@ -151,7 +151,7 @@ export BASCAT="-l +n" export CVS_RSH=ssh export CVSROOT=`mdw-conf cvs-root` export SVNROOT=`mdw-conf svn-root` -export P4PORT=`mdw-conf p4-port` P4USER=`mdw-conf p4-user` +export P4CONFIG=.p4 export BECOME="--preserve-environment"