summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kaufmann <astra@ionic.at>2017-07-18 20:04:58 +0200
committerDavid Kaufmann <astra@ionic.at>2017-07-18 20:04:58 +0200
commitaa1d188fe028ebbad075aac643978c878ef7008f (patch)
tree8ae5feabb540a2224c6e2faf152ced32a59d88ef
parentac60ff50b4f643cb6b198c963802800a0b4b887a (diff)
downloadconfig-aa1d188fe028ebbad075aac643978c878ef7008f.tar.gz
fix check for ssh keys
-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
}