summaryrefslogtreecommitdiff
path: root/utils/searx.sh
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2021-03-03 18:22:41 +0100
committerMarkus Heiser <markus.heiser@darmarit.de>2021-03-03 18:22:41 +0100
commit237b1cfdb378187cdf597a328e28a64ab694012d (patch)
treea7d425edae582c8e1d5953b617e478d32673fb12 /utils/searx.sh
parentc748fc66cf7c4a4ebfecde61dd683422dd6b3901 (diff)
downloadsearxng-237b1cfdb378187cdf597a328e28a64ab694012d.tar.gz
searxng-237b1cfdb378187cdf597a328e28a64ab694012d.zip
[fix] support git versions <v2.22
LTS distros like Ubuntu 18.04 do not ship a up-to-date version of git.:: $ sudo -H ./utils/lxc.sh cmd searx-ubu1804 git --version ... git version 2.17.1 The option `--show-current` was added in git v2.22, the alternative to this option is:: git rev-parse --abbrev-ref HEAD Issue when using option `--show-current`:: [searx-ubu1804] Clone searx sources [searx-ubu1804] ------------------- [searx-ubu1804] [searx-ubu1804] error: unknown option `show-current' [searx-ubu1804] usage: git branch [<options>] [-r | -a] [--merged | --no-merged] .... Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/searx.sh')
-rwxr-xr-xutils/searx.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/searx.sh b/utils/searx.sh
index a33642ee4..b8fdd2eef 100755
--- a/utils/searx.sh
+++ b/utils/searx.sh
@@ -394,8 +394,8 @@ clone_searx() {
info_msg "create local branch ${GIT_BRANCH} from start point: origin/${GIT_BRANCH}"
git branch "${GIT_BRANCH}" "origin/${GIT_BRANCH}"
fi
- if [[ ! $(git branch --show-current) == "${GIT_BRANCH}" ]]; then
- warn_msg "take into account, installing branch $GIT_BRANCH while current branch is $(git branch --show-current)"
+ if [[ ! $(git rev-parse --abbrev-ref HEAD) == "${GIT_BRANCH}" ]]; then
+ warn_msg "take into account, installing branch $GIT_BRANCH while current branch is $(git rev-parse --abbrev-ref HEAD)"
fi
export SERVICE_HOME
git_clone "$REPO_ROOT" "$SEARX_SRC" \