From: Loic Dachary Date: Sat, 7 Mar 2015 16:11:58 +0000 (+0100) Subject: autogen.sh: do not submodule --force if git does not support it X-Git-Tag: v9.0.0~204^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9748d45b61bfe0314affa32a6f2217a17eb7c6bc;p=ceph.git autogen.sh: do not submodule --force if git does not support it Signed-off-by: Loic Dachary --- diff --git a/autogen.sh b/autogen.sh index a7cc704a205..99d4f7b4466 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