2014-07-07 10:25:32 -03:00
|
|
|
#!/bin/sh
|
2014-07-07 12:35:47 -03:00
|
|
|
|
|
|
|
if [ -d NuttX/nuttx ];
|
|
|
|
then
|
2014-07-07 17:20:55 -03:00
|
|
|
STATUSRETVAL=$(git status --porcelain | grep -i "NuttX")
|
2014-07-08 14:11:28 -03:00
|
|
|
if [ -z $STATUSRETVAL ]; then
|
2014-07-07 17:20:55 -03:00
|
|
|
echo "Checked NuttX submodule, correct version found"
|
2014-07-07 12:35:47 -03:00
|
|
|
else
|
2014-07-07 17:20:55 -03:00
|
|
|
echo "NuttX sub repo not at correct version. Try 'make updatesubmodules'"
|
2014-07-07 12:35:47 -03:00
|
|
|
echo "or follow instructions on http://pixhawk.org/dev/git/submodules"
|
|
|
|
exit 1
|
|
|
|
fi
|
2014-07-07 10:25:32 -03:00
|
|
|
else
|
2014-07-07 12:35:47 -03:00
|
|
|
git submodule init;
|
|
|
|
git submodule update;
|
2014-07-07 10:25:32 -03:00
|
|
|
fi
|
|
|
|
|
2014-07-07 12:35:47 -03:00
|
|
|
|
|
|
|
if [ -d mavlink/include/mavlink/v1.0 ];
|
|
|
|
then
|
2014-07-07 17:20:55 -03:00
|
|
|
STATUSRETVAL=$(git status --porcelain | grep -i "mavlink/include/mavlink/v1.0")
|
2014-07-08 14:11:28 -03:00
|
|
|
if [ -z $STATUSRETVAL ]; then
|
2014-07-07 17:20:55 -03:00
|
|
|
echo "Checked mavlink submodule, correct version found"
|
2014-07-07 12:35:47 -03:00
|
|
|
else
|
2014-07-07 17:20:55 -03:00
|
|
|
echo "mavlink sub repo not at correct version. Try 'make updatesubmodules'"
|
2014-07-07 12:35:47 -03:00
|
|
|
echo "or follow instructions on http://pixhawk.org/dev/git/submodules"
|
|
|
|
exit 1
|
|
|
|
fi
|
2014-07-07 12:18:54 -03:00
|
|
|
else
|
2014-07-07 12:35:47 -03:00
|
|
|
git submodule init;
|
|
|
|
git submodule update;
|
2014-07-07 12:18:54 -03:00
|
|
|
fi
|
|
|
|
|
2014-07-07 10:25:32 -03:00
|
|
|
exit 0
|