diff options
| author | David Kaufmann <astra@ionic.at> | 2017-07-18 20:04:58 +0200 |
|---|---|---|
| committer | David Kaufmann <astra@ionic.at> | 2017-07-18 20:04:58 +0200 |
| commit | aa1d188fe028ebbad075aac643978c878ef7008f (patch) | |
| tree | 8ae5feabb540a2224c6e2faf152ced32a59d88ef /home | |
| parent | ac60ff50b4f643cb6b198c963802800a0b4b887a (diff) | |
| download | config-aa1d188fe028ebbad075aac643978c878ef7008f.tar.gz | |
fix check for ssh keys
Diffstat (limited to 'home')
| -rw-r--r-- | home/.zprofile | 8 |
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 } |
