mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
This is a two pronged commit. Firstly we need to handle older versions of git which lack support for recursively updating git submodules. In order to handle this we try three separate git commands until one succeeds and print warning/error messages as appropriate. Secondly we should really update git submodules when 'make' is invoked. Currently we only do this from the root makefile, though if we care enough we can do it elsewhere in our build tree too. This means we no longer have to run configure every time a submodule is updated just to get git submodule update to execute.
10 lines
526 B
Plaintext
Executable File
10 lines
526 B
Plaintext
Executable File
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'
|
|
if test -d .git; then \
|
|
(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
|
|
|