diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2015-11-23 14:29:12 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2015-11-23 14:29:12 -0200 |
commit | b6bf061549113bad6823c34e7e05b91c0fa335d6 (patch) | |
tree | 13cfdcf1985483bcf0032a4dcce7640796191d07 | |
parent | 6b1ba2f8c9cb114a6204ed19da6688b8c6cbe4c4 (diff) | |
download | profile-b6bf061549113bad6823c34e7e05b91c0fa335d6.tar.gz profile-b6bf061549113bad6823c34e7e05b91c0fa335d6.tar.bz2 |
Check for keychain
-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 |