diff options
Diffstat (limited to 'profile.dot.link')
-rw-r--r-- | profile.dot.link | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/profile.dot.link b/profile.dot.link index 6e5393c..b271b2a 100644 --- a/profile.dot.link +++ b/profile.dot.link @@ -125,15 +125,18 @@ eval "`dircolors -b ~/.dircolorsrc`" # SSH and GPG Agents if [ -e "$HOME/.ssh/id_rsa" ]; then - mkdir -p $HOME/.keychain - /usr/bin/keychain -q $HOME/.ssh/id_rsa - if [ -e "$HOME/.keychain/$HOSTNAME-sh" ]; then - . $HOME/.keychain/$HOSTNAME-sh - fi + if [ -x '/usr/bin/keychain' ]; then + mkdir -p $HOME/.keychain + /usr/bin/keychain -q $HOME/.ssh/id_rsa + + if [ -e "$HOME/.keychain/$HOSTNAME-sh" ]; then + . $HOME/.keychain/$HOSTNAME-sh + fi - if [ -e "$HOME/.keychain/$HOSTNAME-sh-gpg" ]; then - . $HOME/.keychain/$HOSTNAME-sh-gpg + if [ -e "$HOME/.keychain/$HOSTNAME-sh-gpg" ]; then + . $HOME/.keychain/$HOSTNAME-sh-gpg + fi fi #if [ -e "$HOME/apps/scripts/ssh-agent-eval" ]; then |