forked from Archive/PX4-Autopilot
Update git check script. Fixes #3733
This commit is contained in:
parent
f8915104e0
commit
c5b1e791bd
3
Makefile
3
Makefile
|
@ -109,9 +109,8 @@ endif
|
|||
# describe how to build a cmake config
|
||||
define cmake-build
|
||||
+@if [ $(PX4_CMAKE_GENERATOR) = "Ninja" ] && [ -e $(PWD)/build_$@/Makefile ]; then rm -rf $(PWD)/build_$@; fi
|
||||
+git submodule init
|
||||
+Tools/check_submodules.sh
|
||||
+@if [ ! -e $(PWD)/build_$@/CMakeCache.txt ]; then git submodule sync && git submodule init && mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -G$(PX4_CMAKE_GENERATOR) -DCONFIG=$(1); fi
|
||||
+Tools/check_submodules.sh
|
||||
+$(PX4_MAKE) -C $(PWD)/build_$@ $(PX4_MAKE_ARGS) $(ARGS)
|
||||
endef
|
||||
|
||||
|
|
|
@ -20,13 +20,13 @@ function check_git_submodule {
|
|||
if [ -d $1 ];
|
||||
then
|
||||
SUBMODULE_STATUS=$(git submodule summary "$1")
|
||||
STATUSRETVAL=$(echo $SUBMODULE_STATUS | grep -A20 -i "$1" | grep "<")
|
||||
STATUSRETVAL=$(echo $SUBMODULE_STATUS | grep -A20 -i "$1")
|
||||
if [ -z "$STATUSRETVAL" ]; then
|
||||
echo "Checked $1 submodule, correct version found"
|
||||
else
|
||||
echo -e "\033[31mChecked $1 submodule, ACTION REQUIRED:\033[0m"
|
||||
echo ""
|
||||
echo -e "New commits required:"
|
||||
echo -e "Different commits:"
|
||||
echo -e "$SUBMODULE_STATUS"
|
||||
echo ""
|
||||
echo ""
|
||||
|
|
Loading…
Reference in New Issue