2020-03-17 21:45:56 -03:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2021-07-07 22:22:23 -03:00
|
|
|
if [ "x$BUILDLOGS" = "x" ]; then
|
|
|
|
BUILDLOGS="../buildlogs"
|
|
|
|
fi
|
|
|
|
DIR="$BUILDLOGS/LogMessages"
|
2020-03-17 21:45:56 -03:00
|
|
|
|
|
|
|
# work from either APM directory or above
|
|
|
|
[ -d ArduPlane ] || cd APM
|
|
|
|
|
|
|
|
/bin/mkdir -p "$DIR"
|
|
|
|
|
|
|
|
generate_log_message_documentation() {
|
|
|
|
VEHICLE="$1"
|
|
|
|
|
|
|
|
# generate Parameters.html, Parameters.rst etc etc:
|
|
|
|
./Tools/autotest/logger_metadata/parse.py --vehicle "$VEHICLE"
|
|
|
|
|
|
|
|
# stash some of the results away:
|
|
|
|
VEHICLE_DIR="$DIR/$VEHICLE"
|
|
|
|
mkdir -p "$VEHICLE_DIR"
|
|
|
|
/bin/cp LogMessages.* "$VEHICLE_DIR/"
|
2020-09-13 21:59:36 -03:00
|
|
|
gzip -9 <"$VEHICLE_DIR"/LogMessages.xml >"$VEHICLE_DIR"/LogMessages.xml.gz.new && mv "$VEHICLE_DIR"/LogMessages.xml.gz.new "$VEHICLE_DIR"/LogMessages.xml.gz
|
|
|
|
xz -e <"$VEHICLE_DIR"/LogMessages.xml >"$VEHICLE_DIR"/LogMessages.xml.xz.new && mv "$VEHICLE_DIR"/LogMessages.xml.xz.new "$VEHICLE_DIR"/LogMessages.xml.xz
|
2020-03-17 21:45:56 -03:00
|
|
|
}
|
|
|
|
|
2022-01-07 00:47:29 -04:00
|
|
|
for vehicle in Rover Plane Copter Tracker Blimp; do
|
2020-03-17 21:45:56 -03:00
|
|
|
generate_log_message_documentation "$vehicle"
|
|
|
|
done
|