2017-02-15 10:05:45 +00:00
#!/bin/sh
2014-08-13 10:39:27 +01:00
SUBMODULE_ERROR = 'Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
SUBMODULE_OK = 'Git submodules updated successfully'
2018-05-10 08:37:03 +00:00
if test -e .git; then \
2014-08-13 10:39:27 +01:00
( git submodule update --init --recursive && echo $SUBMODULE_OK ) \
|| ( git submodule init && git submodule update --recursive && echo $SUBMODULE_OK ) \
|| ( git submodule init && git submodule update && echo $SUBMODULE_ERROR ) \
|| ( echo 'Git submodules could not be updated. Compilation will fail' ) \
fi
2019-04-12 14:10:50 +00:00
if ! test -e external/corefx/README.md; then
echo "Error: Couldn't find the required submodules. This usually happens when using an archive from GitHub instead of https://download.mono-project.com/sources/mono/, or something went wrong while updating submodules."
exit 1
fi