aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%/.bash_profile
blob: dbdce8d6119f87211046644d5e6d238b1bba30b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[ -r "$HOME/.bashrc" ] && source "$HOME/.bashrc"

echo "Welcome to $( hostname )"

spawn_ssh_agent() {
    [ -n "${SSH_AGENT_PID:+x}" ] && return 0

    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
}

spawn_ssh_agent