aboutsummaryrefslogtreecommitdiff
path: root/gitstatus/install
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-06-13 12:15:44 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2020-06-13 12:15:44 +0300
commit4d14f9e0ba94770c55b28c2839c71dda47f97d9c (patch)
tree95f588831e52a0eaa61c8d98a19e3c03e44ffd34 /gitstatus/install
parentfaa510d54c30b9384ee7f4a95b9d04f5c6a8cf62 (diff)
parentb0158178925484c058e6175e174b639237532c63 (diff)
Merge commit 'b0158178925484c058e6175e174b639237532c63'
Diffstat (limited to 'gitstatus/install')
-rwxr-xr-xgitstatus/install30
1 files changed, 7 insertions, 23 deletions
diff --git a/gitstatus/install b/gitstatus/install
index c5b15d22..4303129b 100755
--- a/gitstatus/install
+++ b/gitstatus/install
@@ -131,14 +131,8 @@ END
>&2 echo "[gitstatus] error: GITSTATUS_DAEMON is not absolute path: $daemon"
return 1
fi
- if [ -z "$daemon" ]; then
+ if [ -z "$daemon" && -e "$gitstatus_dir"/usrbin/gitstatusd ]; then
daemon="$gitstatus_dir"/usrbin/gitstatusd
- if [ ! -e "$daemon" ]; then
- daemon="$daemon"-"$uname_s"-"$uname_m"
- if [ ! -e "$daemon" ]; then
- daemon=
- fi
- fi
fi
if [ -n "$daemon" ]; then
local gitstatus_version= libgit2_version=
@@ -184,23 +178,13 @@ END
if [ -z "$no_check" ]; then
# Check if a suitable gitstatusd already exists.
- local daemon="$cache_dir"/"$file"
- if [ -e "$daemon" ]; then
- [ $# = 0 ] || "$@" "$daemon" "$version" 0
- return
+ local daemon="$gitstatus_dir"/usrbin/"$file"
+ if [ ! -e "$daemon" ]; then
+ daemon="$cache_dir"/"$file"
+ [ -e "$daemon" ] || daemon=
fi
- daemon="$daemon"-"$uname_s"-"$uname_m"
- if [ -e "$daemon" ]; then
- local gitstatus_version= libgit2_version=
- if ! . "$gitstatus_dir"/build.info; then
- >&2 echo "[gitstatus] internal error: failed to source build.info"
- return 1
- fi
- if [ -z "$gitstatus_version" ]; then
- >&2 echo "[gitstatus] internal error: empty gitstatus_version in build.info"
- return 1
- fi
- [ $# = 0 ] || "$@" "$daemon" "$gitstatus_version" 0
+ if [ -n "$daemon" ]; then
+ [ $# = 0 ] || "$@" "$daemon" "$version" 0
return
fi
fi