aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2015-11-23 14:29:12 -0200
committerSilvio Rhatto <rhatto@riseup.net>2015-11-23 14:29:12 -0200
commitb6bf061549113bad6823c34e7e05b91c0fa335d6 (patch)
tree13cfdcf1985483bcf0032a4dcce7640796191d07
parent6b1ba2f8c9cb114a6204ed19da6688b8c6cbe4c4 (diff)
downloadprofile-b6bf061549113bad6823c34e7e05b91c0fa335d6.tar.gz
profile-b6bf061549113bad6823c34e7e05b91c0fa335d6.tar.bz2
Check for keychain
-rw-r--r--profile.dot.link17
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