1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 05:16:38 +02:00

build: fix check of WeeChat git repository

The `.git` directory can also be a regular file in a git worktree.
This commit is contained in:
Sébastien Helleu
2024-10-30 08:00:00 +01:00
parent 945782195f
commit d1013b31bd
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -144,7 +144,7 @@ fi
# check git repository
root_dir=$(git rev-parse --show-toplevel)
if [ -z "${root_dir}" ] || [ ! -d "${root_dir}/.git" ] || [ ! -d "${root_dir}/debian-stable" ]; then
if [ -z "${root_dir}" ] || [ ! -e "${root_dir}/.git" ] || [ ! -d "${root_dir}/debian-stable" ]; then
error "this script must be run from WeeChat git repository."
fi
cd "${root_dir}"
+1 -1
View File
@@ -43,7 +43,7 @@ error ()
# check git repository
root_dir=$(git rev-parse --show-toplevel)
if [ -z "${root_dir}" ] || [ ! -d "${root_dir}/.git" ]; then
if [ -z "${root_dir}" ] || [ ! -e "${root_dir}/.git" ]; then
error "this script must be run from WeeChat git repository."
fi
cd "${root_dir}"
+1 -1
View File
@@ -46,7 +46,7 @@ git_version=""
case ${version} in
*-*)
# devel/rc version (like 0.4.0-dev or 0.4.0-rc1)
if [ -d "${root_dir}/.git" ]; then
if [ -e "${root_dir}/.git" ]; then
git_version=$(cd "${root_dir}" && git describe 2>/dev/null)
fi
;;