From 4d2679e94b5814561c8434fd51371e8e3a8cfc5c Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 21 Apr 2013 14:42:45 -0300 Subject: Adding keychain portion into .profile --- modules/profile/profile.dot.link | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/modules/profile/profile.dot.link b/modules/profile/profile.dot.link index 3b71de0..b3179f2 100644 --- a/modules/profile/profile.dot.link +++ b/modules/profile/profile.dot.link @@ -30,10 +30,23 @@ mkdir -p $TMP # Dir colors eval "`dircolors -b ~/.dircolorsrc`" -# SSH Agent -#if [ -e "$HOME/apps/scripts/ssh-agent-eval" ]; then -# $HOME/apps/scripts/ssh-agent-eval -#fi +# 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 + source $HOME/.keychain/$HOSTNAME-sh + fi + + if [ -e "$HOME/.keychain/$HOSTNAME-sh-gpg" ]; then + source $HOME/.keychain/$HOSTNAME-sh-gpg + fi + + #if [ -e "$HOME/apps/scripts/ssh-agent-eval" ]; then + # $HOME/apps/scripts/ssh-agent-eval + #fi +fi # GPG Agent #if [ -e "$HOME/apps/scripts/gpg-agent-eval" ]; then -- cgit v1.2.3