diff --git a/tools/build_debian.sh b/tools/build_debian.sh index d352dc0..1dfa8a0 100755 --- a/tools/build_debian.sh +++ b/tools/build_debian.sh @@ -134,7 +134,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 Relay git repository." fi cd "${root_dir}" diff --git a/tools/makedist.sh b/tools/makedist.sh index f6a1a18..fa1f075 100755 --- a/tools/makedist.sh +++ b/tools/makedist.sh @@ -35,7 +35,7 @@ # 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 echo "This script must be run from WeeChat Relay git repository." exit 1 fi diff --git a/tools/set_git_version.sh b/tools/set_git_version.sh index abf9484..ba0a12c 100755 --- a/tools/set_git_version.sh +++ b/tools/set_git_version.sh @@ -43,7 +43,7 @@ git_version="" case ${version} in *-*) # devel/rc version (like 1.0.0-dev or 1.0.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 if [ -z "${git_version}" ]; then