diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2013-07-31 17:26:30 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2013-07-31 17:26:30 +1200 |
commit | f5ed4cd090b321064039441e40fe46a6995abf9a (patch) | |
tree | 371166922ae8e079eca565322496068d658b00ba /sh/profile.d/keychain.sh | |
parent | Place missing quotes (diff) | |
download | dotfiles-f5ed4cd090b321064039441e40fe46a6995abf9a.tar.gz dotfiles-f5ed4cd090b321064039441e40fe46a6995abf9a.zip |
Use standard structure for if/for in shell
Mostly for clarity reasons; using this syntax:
if [ condition ]; then
commands
fi
As opposed to:
if [ condition ]
then
commands
fi
Or:
[ condition ] && command
Diffstat (limited to 'sh/profile.d/keychain.sh')
-rw-r--r-- | sh/profile.d/keychain.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sh/profile.d/keychain.sh b/sh/profile.d/keychain.sh index a53edb65..3b7b5456 100644 --- a/sh/profile.d/keychain.sh +++ b/sh/profile.d/keychain.sh @@ -1,6 +1,8 @@ # Keychain -command -v ssh-askpass >/dev/null 2>&1 \ - && export SSH_ASKPASS=`which ssh-askpass` -command -v keychain >/dev/null 2>&1 \ - && eval `keychain --eval --ignore-missing --quiet id_dsa id_rsa id_ecsda` +if command -v ssh-askpass >/dev/null; then + export SSH_ASKPASS=`which ssh-askpass` +fi +if command -v keychain >/dev/null; then + eval `keychain --eval --ignore-missing --quiet id_dsa id_rsa id_ecsda` +fi |