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:
@@ -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
@@ -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}"
|
||||
|
||||
@@ -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
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user