Merge branch 'master' of github.com:scottwallacesh/dotfiles
This commit is contained in:
commit
c02eedcbdb
11
.bashrc
11
.bashrc
|
@ -111,8 +111,15 @@ export GOPATH=${HOME}/src/go
|
|||
#--------------------------------------------------------------------------------
|
||||
# Check if we already have an agent running and sourced
|
||||
if [ -z "${SSH_AUTH_SOCK}" ]; then
|
||||
eval `ssh-agent -s`
|
||||
ssh-add
|
||||
SSH_AUTH_SOCK_FILE=~/.ssh/auth_sock
|
||||
if [ -S ${SSH_AUTH_SOCK_FILE} ]; then
|
||||
export SSH_AUTH_SOCK=${SSH_AUTH_SOCK_FILE}
|
||||
export SSH_AGENT_PID=$(cat ~/.ssh/agent.pid)
|
||||
else
|
||||
eval `ssh-agent -a ${SSH_AUTH_SOCK_FILE} -s`
|
||||
echo ${SSH_AGENT_PID} > ~/.ssh/agent.pid
|
||||
ssh-add
|
||||
fi
|
||||
fi
|
||||
#--------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in a new issue