Fixed check_submodules.sh for UAVCAN

This commit is contained in:
Pavel Kirienko 2014-07-12 17:45:05 +04:00
parent 9a56892c2b
commit 024c8213a1
1 changed files with 12 additions and 4 deletions

View File

@ -46,14 +46,22 @@ else
fi
if [ -d uavcan/libuavcan_drivers ];
if [ -d uavcan ]
then
STATUSRETVAL=$(git status --porcelain | grep -i uavcan)
if [ "$STATUSRETVAL" == "" ]; then
STATUSRETVAL=$(git submodule summary | grep -A20 -i uavcan | grep "<")
if [ -z "$STATUSRETVAL" ]
then
echo "Checked uavcan submodule, correct version found"
else
echo "uavcan sub repo not at correct version. Try 'make updatesubmodules'"
echo ""
echo ""
echo "uavcan sub repo not at correct version. Try 'git submodule update'"
echo "or follow instructions on http://pixhawk.org/dev/git/submodules"
echo ""
echo ""
echo "New commits required:"
echo "$(git submodule summary)"
echo ""
exit 1
fi
else