summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home/.zprofile8
1 files changed, 5 insertions, 3 deletions
diff --git a/home/.zprofile b/home/.zprofile
index c45f71f..295cde5 100644
--- a/home/.zprofile
+++ b/home/.zprofile
@@ -23,9 +23,11 @@ function start_agent {
chmod 600 "${SSH_ENV}"
. "${SSH_ENV}" > /dev/null
if [[ -x /usr/bin/ssh-add ]]; then
- for key in $(find ${HOME}/.ssh/keys/ -maxdepth 1 -name 'id_*' | egrep -v '.pub$'); do
- /usr/bin/ssh-add $key
- done
+ if [[ -d ${HOME}/.ssh/keys ]]; then
+ for key in $(find ${HOME}/.ssh/keys/ -maxdepth 1 -name 'id_*' | egrep -v '.pub$'); do
+ /usr/bin/ssh-add $key
+ done
+ fi
fi
}