Added check if find-agent is sourced and aliases to own scripts.
This commit is contained in:
parent
074d8f189a
commit
e025a0cc72
@ -4,9 +4,13 @@
|
||||
# TODO: make keys configurable
|
||||
#
|
||||
|
||||
SSH_AUTH_SOCK=$(find /tmp/ -name 'agent*' -printf "%T@ %Tc %p\n" | sort -n | tail -1 | awk '{print $7}')
|
||||
echo -e "$SSH_AUTH_SOCK"
|
||||
export SSH_AUTH_SOCK
|
||||
ssh-add ~/.ssh/daimler_rsa
|
||||
ssh-add ~/.ssh/id_materna
|
||||
|
||||
if [[ $_ = $0 ]]; then
|
||||
echo "Script is a subshell, will source it: source $0"
|
||||
exit 42
|
||||
else
|
||||
SSH_AUTH_SOCK=$(find /tmp/ -name 'agent*' -printf "%T@ %Tc %p\n" | sort -n | tail -1 | awk '{print $7}')
|
||||
echo -e "$SSH_AUTH_SOCK"
|
||||
export SSH_AUTH_SOCK
|
||||
ssh-add ~/.ssh/daimler_rsa
|
||||
ssh-add ~/.ssh/id_materna
|
||||
fi
|
||||
|
||||
@ -28,3 +28,8 @@ alias tailer="tail --follow=name --retry"
|
||||
|
||||
# git aliases
|
||||
alias gg='git graph'
|
||||
|
||||
# aliases to own scripts
|
||||
alias start-agent='start-agent.sh'
|
||||
alias find-agent='find-agent.sh'
|
||||
alias findAgent='find-agent.sh'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user