X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/a5abc1d29be727b2eb2159a614c9f12b5e2ea9d9..1ee519346fac51178b3e3e55565531f0cdd4d4be:/dot/bash_profile diff --git a/dot/bash_profile b/dot/bash_profile index ffea97f..69fbebf 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" @@ -198,6 +198,10 @@ ulimit -S -c 0 # --- Start an ssh authentication agent --- +if stuff=$(gnome-keyring-daemon -s 2>/dev/null); then + eval "$stuff"; export GNOME_KEYRING_CONTROL SSH_AUTH_SOCK +fi + eval `start-ssh-agent -b` if [ -z "$__mdw_bashrc" ] && [ "$__mdw_force_secure_session" = "yes" ] || @@ -232,11 +236,11 @@ fi [ -f "$HOME/.profile-local" ] && . "$HOME/.profile-local" +fi + # --- Now, if my .bashrc hasn't been run yet, run it --- # # Oh, don't do that if we don't have a terminal. [ -z "$__mdw_bashrc" ] && [ -t 0 ] && \ [ -r $HOME/.bashrc ] && . $HOME/.bashrc - -fi