diff options
Diffstat (limited to '%HOME%/.bash_profile')
-rw-r--r-- | %HOME%/.bash_profile | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/%HOME%/.bash_profile b/%HOME%/.bash_profile index b545321..bb4d98e 100644 --- a/%HOME%/.bash_profile +++ b/%HOME%/.bash_profile @@ -1,13 +1,14 @@ -[ -f "$HOME/.bashrc" ] && source "$HOME/.bashrc" +[ -r "$HOME/.bashrc" ] && source "$HOME/.bashrc" echo "Welcome to $( hostname )" spawn_ssh_agent() { [ -n "${SSH_AGENT_PID:+x}" ] && return 0 - eval "$( ssh-agent -s )" > /dev/null \ - && trap "$( printf 'kill %q' "$SSH_AGENT_PID" )" 0 \ - && ssh-add &> /dev/null + command -v ssh-agent &> /dev/null \ + && eval "$( ssh-agent -s )" > /dev/null \ + && [ -n "${SSH_AGENT_PID:+x}" ] \ + && trap "$( printf 'kill %q' "$SSH_AGENT_PID" )" 0 } [ "$( uname -o )" == 'Cygwin' ] && spawn_ssh_agent |