From 2eb018b2730d5b3ceeca430aabbf39cf560ce9fc Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Mon, 7 Jul 2014 22:20:55 +0200 Subject: [PATCH] bugfixes for checks and tools --- Makefile | 1 + Tools/check_submodules.sh | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 8ec5277e22..8bf96ca230 100644 --- a/Makefile +++ b/Makefile @@ -218,6 +218,7 @@ checksubmodules: .PHONY: updatesubmodules updatesubmodules: + $(Q) (git submodule init) $(Q) (git submodule update) # diff --git a/Tools/check_submodules.sh b/Tools/check_submodules.sh index 1156490d7b..fb180ef47e 100755 --- a/Tools/check_submodules.sh +++ b/Tools/check_submodules.sh @@ -1,22 +1,6 @@ #!/bin/sh if [ -d NuttX/nuttx ]; - then - STATUSRETVAL=$(git status --porcelain | grep -i "mavlink/include/mavlink/v1.0") - if [ "$STATUSRETVAL" == "" ]; then - echo "Checked mavlink submodule, correct version found" - else - echo "mavlink sub repo not at correct version. Try 'make updatesubmodules'" - echo "or follow instructions on http://pixhawk.org/dev/git/submodules" - exit 1 - fi -else - git submodule init; - git submodule update; -fi - - -if [ -d mavlink/include/mavlink/v1.0 ]; then STATUSRETVAL=$(git status --porcelain | grep -i "NuttX") if [ "$STATUSRETVAL" == "" ]; then @@ -31,4 +15,20 @@ else git submodule update; fi + +if [ -d mavlink/include/mavlink/v1.0 ]; + then + STATUSRETVAL=$(git status --porcelain | grep -i "mavlink/include/mavlink/v1.0") + if [ "$STATUSRETVAL" == "" ]; then + echo "Checked mavlink submodule, correct version found" + else + echo "mavlink sub repo not at correct version. Try 'make updatesubmodules'" + echo "or follow instructions on http://pixhawk.org/dev/git/submodules" + exit 1 + fi +else + git submodule init; + git submodule update; +fi + exit 0