]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
autogen.sh: do not submodule --force if git does not support it 3900/head
authorLoic Dachary <ldachary@redhat.com>
Sat, 7 Mar 2015 16:11:58 +0000 (17:11 +0100)
committerLoic Dachary <ldachary@redhat.com>
Sat, 7 Mar 2015 16:11:58 +0000 (17:11 +0100)
Signed-off-by: Loic Dachary <ldachary@redhat.com>
autogen.sh

index a7cc704a20538e920bdd61f0bd46f07212752aad..99d4f7b446610abd3226f20651a163ab5828d525 100755 (executable)
@@ -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