]> git.sthu.org Git - shutils.git/blob - dotfiles/shell/.profile-sshagent
vim: Use FSwitch plugin
[shutils.git] / dotfiles / shell / .profile-sshagent
1 # Add "source $HOME/.profile-sshagent" to your .profile
2
3 SSH_AGENT_FILE=~/.ssh/ssh-agent-info-$(hostname)
4 if [ -f "$SSH_AGENT_FILE" ]; then
5 source "$SSH_AGENT_FILE" > /dev/null
6 fi
7 if [ ! -w "$SSH_AUTH_SOCK" ]; then
8 /usr/bin/ssh-agent -s > "$SSH_AGENT_FILE" && \
9 source "$SSH_AGENT_FILE" > /dev/null
10 fi
11
12
13 # Local variables:
14 # mode: shell-script
15 # sh-basic-offset: 4
16 # sh-indent-comment: t
17 # indent-tabs-mode: nil
18 # End:
19 # ex: ts=4 sw=4 et filetype=sh