Signed-off-by: Loic Dachary <ldachary@redhat.com>
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