aboutsummaryrefslogtreecommitdiff
path: root/gitstatus/gitstatus.plugin.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'gitstatus/gitstatus.plugin.zsh')
-rw-r--r--gitstatus/gitstatus.plugin.zsh4
1 files changed, 3 insertions, 1 deletions
diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh
index ecb47db8..e6dcb5a0 100644
--- a/gitstatus/gitstatus.plugin.zsh
+++ b/gitstatus/gitstatus.plugin.zsh
@@ -278,8 +278,10 @@ function gitstatus_start() {
local os && os=$(uname -s) && [[ -n $os ]]
[[ $os != Linux || $(uname -o) != Android ]] || os=Android
local arch && arch=$(uname -m) && [[ -n $arch ]]
+ local ldd_v && (( $+commands[ldd] )) && ldd_v=$(command ldd --version 2>/dev/null) || true
+ local linkage && [[ ${(L)ldd_v} == (*glibc*|*gnu\ libc*) ]] || linkage=-static
- local daemon=${GITSTATUS_DAEMON:-$dir/bin/gitstatusd-${os:l}-${arch:l}}
+ local daemon=${GITSTATUS_DAEMON:-$dir/bin/gitstatusd-${os:l}-${arch:l}${linkage}}
[[ -f $daemon ]]
lock_file=$(mktemp "${TMPDIR:-/tmp}"/gitstatus.$$.lock.XXXXXXXXXX)