autogen.sh: do not submodule --force if git does not support it

Signed-off-by: Loic Dachary <ldachary@redhat.com>
This commit is contained in:
Loic Dachary 2015-03-07 17:11:58 +01:00
parent 39adebbdaa
commit 9748d45b61

View File

@ -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