]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
tests: Support git-worktree(1)
authorAlejandro Colomar <alx@kernel.org>
Sun, 26 Feb 2023 14:39:15 +0000 (15:39 +0100)
committerSerge Hallyn <serge@hallyn.com>
Mon, 27 Feb 2023 20:16:50 +0000 (14:16 -0600)
git-worktree(1) uses a regular file for <.git>, instead of a directory.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
tests/common/config.sh

index ffd96927999b39b8589d01e622de0b170e3bd40c..664d1056a75f852d14fb1cc1c03713d375f9616c 100644 (file)
@@ -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