From 9748d45b61bfe0314affa32a6f2217a17eb7c6bc Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Sat, 7 Mar 2015 17:11:58 +0100 Subject: [PATCH] autogen.sh: do not submodule --force if git does not support it Signed-off-by: Loic Dachary --- autogen.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index a7cc704a20538..99d4f7b446610 100755 --- a/autogen.sh +++ b/autogen.sh @@ -29,7 +29,8 @@ else fi if test -d ".git" ; then - if ! git submodule sync || ! git submodule update --force --init --recursive; then + force=$(if git submodule usage 2>&1 | grep --quiet 'update.*--force'; then echo --force ; fi) + if ! git submodule sync || ! git submodule update $force --init --recursive; then echo "Error: could not initialize submodule projects" echo " Network connectivity might be required." exit 1 -- 2.39.5