mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
check_submodules: Don't override submodule
Previously make would override a submodule, now it only does submodule init and override if the submodule is not already checked out.
This commit is contained in:
parent
9a32c08cff
commit
5af9dc280f
@ -6,18 +6,13 @@
|
|||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -f src/modules/uavcan/libuavcan/CMakeLists.txt ]
|
|
||||||
then
|
|
||||||
echo "Git submodule config valid."
|
|
||||||
else
|
|
||||||
git submodule update --init --recursive
|
|
||||||
fi
|
|
||||||
|
|
||||||
GITSTATUS=$(git status)
|
GITSTATUS=$(git status)
|
||||||
|
|
||||||
function check_git_submodule {
|
function check_git_submodule {
|
||||||
|
|
||||||
if [ -d $1 ];
|
# The .git exists in a submodule if init and update have been done.
|
||||||
|
if [ -f $1"/.git" ];
|
||||||
then
|
then
|
||||||
SUBMODULE_STATUS=$(git submodule summary "$1")
|
SUBMODULE_STATUS=$(git submodule summary "$1")
|
||||||
STATUSRETVAL=$(echo $SUBMODULE_STATUS | grep -A20 -i "$1")
|
STATUSRETVAL=$(echo $SUBMODULE_STATUS | grep -A20 -i "$1")
|
||||||
@ -58,7 +53,7 @@ if [ -d $1 ];
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
git submodule update --init --recursive;
|
git submodule update --init --recursive $1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user