Submodules: use submodule sync --recursive

This should make changes where the submodule repository changes trouble
free for users.
This commit is contained in:
Julian Oes 2016-03-03 13:42:13 +01:00 committed by Lorenz Meier
parent b1a890f0cd
commit dcf022f480
2 changed files with 4 additions and 2 deletions

View File

@ -198,7 +198,7 @@ clean:
@rm -rf build_*/ @rm -rf build_*/
@(cd NuttX && git clean -d -f -x) @(cd NuttX && git clean -d -f -x)
@(cd src/modules/uavcan/libuavcan && git clean -d -f -x) @(cd src/modules/uavcan/libuavcan && git clean -d -f -x)
@(git submodule sync) @(git submodule sync --recursive)
# targets handled by cmake # targets handled by cmake
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \ cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \

View File

@ -28,7 +28,8 @@ if [ -f $1"/.git" ];
echo -e " *******************************************************************************" echo -e " *******************************************************************************"
echo -e " * \033[31mIF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS):\033[0m *" echo -e " * \033[31mIF YOU DID NOT CHANGE THIS FILE (OR YOU DON'T KNOW WHAT A SUBMODULE IS):\033[0m *"
echo -e " * \033[31mHit 'u' and <ENTER> to update ALL submodules and resolve this.\033[0m *" echo -e " * \033[31mHit 'u' and <ENTER> to update ALL submodules and resolve this.\033[0m *"
echo -e " * (performs \033[94mgit submodule update --init --recursive\033[0m) *" echo -e " * (performs \033[94mgit submodule sync --recursive\033[0m *"
echo -e " * and \033[94mgit submodule update --init --recursive\033[0m ) *"
echo -e " *******************************************************************************" echo -e " *******************************************************************************"
echo "" echo ""
echo "" echo ""
@ -44,6 +45,7 @@ if [ -f $1"/.git" ];
else else
if [ "$user_cmd" == "u" ] if [ "$user_cmd" == "u" ]
then then
git submodule sync --recursive
git submodule update --init --recursive git submodule update --init --recursive
echo "Submodule fixed, continuing build.." echo "Submodule fixed, continuing build.."
else else