PX4-Autopilot/Tools/check_submodules.sh
Lorenz Meier 52713bc0ba Revert "Tools: skip check_submodules.sh when NUTTX_SRC is set"
This reverts commit ac8f179f2dad99d664a6f9de4df954bea7fe5858.
2014-07-08 15:00:44 +02:00

35 lines
863 B
Bash
Executable File

#!/bin/sh
if [ -d NuttX/nuttx ];
then
STATUSRETVAL=$(git status --porcelain | grep -i "NuttX")
if [ "$STATUSRETVAL" == "" ]; then
echo "Checked NuttX submodule, correct version found"
else
echo "NuttX 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 "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