Egregoros

Signal feed

Timeline

Post

Remote status

Context

4

@feld this came up at work today:

https://gist.github.com/dlangille/48cbb3b31b2ad4d2eba7f34f053c4b4c

if [ `uname -o` = "Darwin" ]; then
if [ -z "$INTELLIJ_ENVIRONMENT_READER" ]; then
keychain --debug --ssh-allow-forwarded ~/.ssh/id_rsa
keychain --ssh-allow-forwarded ~/.ssh/id_rsa_vrt_new
fi
else
if [ "$SSH_AUTH_SOCK" != "$HOME/.ssh/`hostname`-agent_sock" ] ; then
ssh-add -l > /dev/null 2>&1
if [ $? -eq 0 ]; then
unlink "$HOME/.ssh/`hostname`-agent_sock" 2>/dev/null
ln -s "$SSH_AUTH_SOCK" "$HOME/.ssh/`hostname`-agent_sock"
export SSH_AUTH_SOCK="$HOME/.ssh/`hostname`-agent_sock"
else
echo -n
#echo "Bad agent"
fi
else
#echo "No agent (rc)"
echo -n
fi
fi

Replies

3