takin' a look
[betaflight.git] / build_docs.sh
blob8e8911585cf8b498d7a29d96b434ff6ded614ab8
1 #!/bin/bash
3 filename=Manual
4 doc_files=(
5 'Introduction.md'
6 'Getting Started.md'
7 'Safety.md'
8 'Installation.md'
9 'Configuration.md'
10 'Cli.md'
11 'Serial.md'
12 'Rx.md'
13 'Spektrum bind.md'
14 'Failsafe.md'
15 'Battery.md'
16 'Gps.md'
17 'Rssi.md'
18 'Telemetry.md'
19 'LedStrip.md'
20 'Display.md'
21 'Buzzer.md'
22 'Sonar.md'
23 'Profiles.md'
24 'Modes.md'
25 'Inflight Adjustments.md'
26 'Controls.md'
27 'Autotune.md'
28 'Blackbox.md'
29 'Migrating from baseflight.md'
30 'Boards.md'
31 'Board - AlienFlight.md'
32 'Board - CC3D.md'
33 'Board - CJMCU.md'
34 'Board - Naze32.md'
35 'Board - Sparky.md'
36 'Board - Olimexino.md'
37 'Board - ChebuzzF3.md'
40 if which gimli >/dev/null; then
41 echo "Building ${filename}.pdf"
42 pushd . >/dev/null
43 cd docs
45 rm -f ${filename}.md
46 for i in "${doc_files[@]}"
48 cat "$i" >> ${filename}.md
49 done
50 rm -f ${filename}.pdf
51 gimli -f ${filename}.md -stylesheet override.css \
52 -w '--toc --title "Cleanflight Manual" --footer-right "[page]" --toc-depth 1'
53 rm ${filename}.md
54 popd >/dev/null
55 else
56 echo -e "\nFAILED"
57 echo "Install Gimli to build the PDF documentation"
58 echo -e "https://github.com/walle/gimli\n"
59 exit 1