git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.bash/postexec.bash15
1 files changed, 12 insertions, 3 deletions
diff --git a/.bash/postexec.bash b/.bash/postexec.bash
index 6137814..5164190 100644
--- a/.bash/postexec.bash
+++ b/.bash/postexec.bash
@@ -1,9 +1,18 @@
declare -x SSH_AUTH_SOCK SSH_AGENT_PID
if [ -n "$SSHENVFILE" ] && [ -r "$SSHENVFILE" ];then
if source "$SSHENVFILE"; then
- if echo "${SSHAGH[@]}"|tr ' ' '\n'|grep -P "^$(hostname -f)$" > /dev/null;then
- add-sshagent-init
- fi
+ case "$OSNAME" in
+ 'sunos')
+ if echo "${SSHAGH[@]}"|tr ' ' '\n'|grep -E "^$(cat /etc/nodename)\$"
+ add-sshagent-init
+ fi
+ ;;
+ *)
+ if echo "${SSHAGH[@]}"|tr ' ' '\n'|grep -P "^$(hostname -f)\$" > /dev/null;then
+ add-sshagent-init
+ fi
+ ;;
+ esac
fi
fi
for gitpsrc in "/usr/share/git/git-prompt.sh" "/usr/local/share/git/git-prompt.sh" \