1 SUBMODULE_ERROR='Could not recursively update all git submodules. You may experience compilation problems if some submodules are out of date'
2 SUBMODULE_OK='Git submodules updated successfully'
3 if test -d .git; then \
4 (git submodule update --init --recursive && echo $SUBMODULE_OK) \
5 || (git submodule init && git submodule update --recursive && echo $SUBMODULE_OK) \
6 || (git submodule init && git submodule update && echo $SUBMODULE_ERROR) \
7 || (echo 'Git submodules could not be updated. Compilation will fail') \