Permalink
767f1fc Jan 12, 2017
@hydra @pulsar256 @cmavr8 @tracernz @stuphi @MJ666 @aergid @dan557
executable file 68 lines (64 sloc) 1.29 KB
#!/bin/bash
filename=Manual
doc_files=(
'Introduction.md'
'Getting Started.md'
'Safety.md'
'Installation.md'
'Configuration.md'
'Serial.md'
'Rx.md'
'Spektrum bind.md'
'Failsafe.md'
'Battery.md'
'Gps.md'
'Rssi.md'
'Telemetry.md'
'LedStrip.md'
'Display.md'
'Buzzer.md'
'Sonar.md'
'Profiles.md'
'Modes.md'
'Inflight Adjustments.md'
'Controls.md'
'Gtune.md'
'Blackbox.md'
'Migrating from baseflight.md'
'VTX.md'
'Boards.md'
'Board - SPRacingF3Mini.md'
'Board - SPRacingF3.md'
'Board - ColibriRace.md'
'Board - Sparky.md'
'Board - Motolab.md'
'Board - RMDO.md'
'Board - Naze32.md'
'Board - Paris Air Hero 32.md'
'Board - AlienFlight.md'
'Board - CC3D.md'
'Board - CJMCU.md'
'Board - ChebuzzF3.md'
'Cli.md'
)
if which gimli >/dev/null; then
echo "Building ${filename}.pdf"
pushd . >/dev/null
cd docs
rm -f ${filename}.md
for i in "${doc_files[@]}"
do
cat "$i" >> ${filename}.md
echo >> ${filename}.md
done
rm -f ${filename}.pdf
gimli -f ${filename}.md -stylesheet override.css \
-w '--toc --title "Cleanflight Manual" --footer-right "[page]" --toc-depth 1'
rm ${filename}.md
popd >/dev/null
else
echo -e "\nFAILED"
echo "Install Gimli to build the PDF documentation"
echo -e "https://github.com/walle/gimli\n"
exit 1
fi