3 echo "Removing old library..."
11 echo "Downloading or updating MAVLink sources..."
13 if [ -d "mavlink-src/.git" ]; then
14 cd mavlink-src ||
return 1
16 git checkout origin
/master
19 git clone https
://github.com
/mavlink
/mavlink.git
--recursive mavlink-src
22 PYTHONPATH
="$(pwd)/mavlink-src"
24 echo "Running MAVLink generator..."
25 python
-m pymavlink.tools.mavgen
--lang=C
--wire-protocol=2.0 --output=. mavlink-src
/message_definitions
/v1.0
/common.xml
--no-validate
27 echo "Removing inlines..."
28 sed -i 's/ inline//' protocol.h