For the submodules, it’s safer to use: git submodule update --init --recursive. This was suggested by kmilos:
git submodule update --init --recursive
You’ll find my current build script with detailed explanation here: