Created
February 16, 2011 16:55
-
-
Save UserAd/829712 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare -x LANG="ru_RU.UTF-8" | |
SSH_AGENT_PID=`ps x| grep ssh-agent | grep -v grep | awk '{print $1}'`; | |
if [ -n "$SSH_AGENT_PID" ]; then | |
export SSH_AGENT_PID; | |
SSH_AUTH_SOCK=/tmp/`ls --co=never /tmp | grep ssh`; | |
SSH_AUTH_SOCK=$SSH_AUTH_SOCK/`ls --co=never $SSH_AUTH_SOCK`; | |
export SSH_AUTH_SOCK; | |
else | |
eval `ssh-agent`; | |
ssh-add ~/.ssh/identity; | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment