If the v4l-utils repository is a git submodule the $(top_srcdir)/.git is a file and not a directory. Update the shell check to allow the test to pass in both cases. Signed-off-by: Niklas Söderlund <niklas.soderlund@xxxxxxxxxxxx> --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index f144a50d034fbda0..4ac4195cd6e4747e 100644 --- a/configure.ac +++ b/configure.ac @@ -588,7 +588,7 @@ fi CPPFLAGS="-I\$(top_srcdir)/lib/include -Wall -Wpointer-arith -D_GNU_SOURCE $CPPFLAGS" # Obtain git SHA of HEAD -AC_SUBST(GIT_SHA, ["-DGIT_SHA=\$(shell if test -d \$(top_srcdir)/.git ; then git -C \$(top_srcdir) rev-parse --short=12 HEAD ; fi)"]) +AC_SUBST(GIT_SHA, ["-DGIT_SHA=\$(shell if test -e \$(top_srcdir)/.git ; then git -C \$(top_srcdir) rev-parse --short=12 HEAD ; fi)"]) # Obtain git commit count of HEAD AC_SUBST(GIT_COMMIT_CNT, ["-DGIT_COMMIT_CNT=\$(shell if test -d \$(top_srcdir)/.git ; then printf '-'; git -C \$(top_srcdir) rev-list --count HEAD ; fi)"]) -- 2.31.1