#!/bin/sh for protocol in 1.0; do for xml in ../../message_definitions/v$protocol/*.xml; do base=$(basename $xml .xml) mkdir -p javascript/implementations/mavlink_${base}_v${protocol} # Generate MAVLink implementation ../tools/mavgen.py --lang=JavaScript --wire-protocol=$protocol --output=javascript/implementations/mavlink_${base}_v${protocol}/mavlink.js $xml || exit 1 # Create package.json file cat >javascript/implementations/mavlink_${base}_v${protocol}/package.json <"], "main" : "mavlink.js", "repository" : { "type" : "git", "url" : "https://github.com/mavlink/mavlink" }, "dependencies" : { "underscore" : "", "jspack":"", "winston": "" }, "devDependencies" : { "should" : "", "mocha" : "", "sinon" : "" } } EOF done done