blob: 8b2ab980ec548a9188e389024211879c709a796c (
plain)
1
2
3
4
5
6
7
8
|
# Starts the ssh-agent if it is not running, and either way sources the required environment variables.
if [ -z "$(ps -e | grep ssh-agent)" ]; then
# ssh-agent does not seem to be running, start it
ssh-agent | sed -r '/echo Agent pid [0-9]+;/d' > ~/.sshsession
fi
eval $(<~/.sshsession)
|