From dcf022f480cf1a84bc4c1d2e04bb56698fdc3e53 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Thu, 3 Mar 2016 13:42:13 +0100 Subject: [PATCH] Submodules: use submodule sync --recursive This should make changes where the submodule repository changes trouble free for users. --- Makefile | 2 +- Tools/check_submodules.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e059893214..fcbbaea789 100644 --- a/Makefile +++ b/Makefile @@ -198,7 +198,7 @@ clean: @rm -rf build_*/ @(cd NuttX && 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 cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \ diff --git a/Tools/check_submodules.sh b/Tools/check_submodules.sh index adc4f88d89..0ccfb831aa 100755 --- a/Tools/check_submodules.sh +++ b/Tools/check_submodules.sh @@ -28,7 +28,8 @@ if [ -f $1"/.git" ]; 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[31mHit 'u' and 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 "" echo "" @@ -44,6 +45,7 @@ if [ -f $1"/.git" ]; else if [ "$user_cmd" == "u" ] then + git submodule sync --recursive git submodule update --init --recursive echo "Submodule fixed, continuing build.." else