Cleanup sensor detection. Less code required and a similar pattern is used for each...
[betaflight.git] / build_docs.sh
blob464dbe5f6e469672f3dd93dc03ecbf611f99c24d
1 #!/bin/bash
3 filename=Manual
4 doc_files=(
5 'Introduction.md'
6 'Installation.md'
7 'Configuration.md'
8 'Cli.md'
9 'Serial.md'
10 'Rx.md'
11 'Spektrum bind.md'
12 'Failsafe.md'
13 'Battery.md'
14 'Gps.md'
15 'Rssi.md'
16 'Telemetry.md'
17 'LedStrip.md'
18 'Display.md'
19 'Buzzer.md'
20 'Sonar.md'
21 'Profiles.md'
22 'Modes.md'
23 'Inflight Adjustments.md'
24 'Controls.md'
25 'Autotune.md'
26 'Blackbox.md'
27 'Migrating from baseflight.md'
28 'Boards.md'
29 'Board - AlienWii32.md'
30 'Board - CC3D.md'
31 'Board - CJMCU.md'
32 'Board - Naze32.md'
33 'Board - Sparky.md'
34 'Board - Olimexino.md'
35 'Board - CheBuzzF3.md'
38 if which gimli >/dev/null; then
39 echo "Building ${filename}.pdf"
40 pushd . >/dev/null
41 cd docs
43 rm -f ${filename}.md
44 for i in "${doc_files[@]}"
46 cat "$i" >> ${filename}.md
47 done
48 rm -f ${filename}.pdf
49 gimli -f ${filename}.md
50 rm ${filename}.md
51 popd >/dev/null
52 else
53 echo -e "\nFAILED"
54 echo "Install Gimli to build the PDF documentation"
55 echo -e "https://github.com/walle/gimli\n"
56 exit 1