From: Alejandro Colomar Date: Sun, 26 Feb 2023 14:39:15 +0000 (+0100) Subject: tests: Support git-worktree(1) X-Git-Tag: 4.14.0-rc1~146 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a72065a108cfde70c76f8b0b629e04bdc68bba12;p=thirdparty%2Fshadow.git tests: Support git-worktree(1) git-worktree(1) uses a regular file for <.git>, instead of a directory. Signed-off-by: Alejandro Colomar --- diff --git a/tests/common/config.sh b/tests/common/config.sh index ffd969279..664d1056a 100644 --- a/tests/common/config.sh +++ b/tests/common/config.sh @@ -3,10 +3,10 @@ set -e build_path=$(pwd) -while [ "${build_path}" != "/" -a ! -d "${build_path}/.git" ]; do +while [ "${build_path}" != "/" -a ! -e "${build_path}/.git" ]; do build_path=$(dirname ${build_path}) done -if [ ! -d "${build_path}/.git" ]; then +if [ ! -e "${build_path}/.git" ]; then echo "Not inside git directory" 1>&2 exit 1 fi