-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_docs.sh
executable file
·60 lines (57 loc) · 1.09 KB
/
build_docs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
filename=Manual
doc_files=(
'Introduction.md'
'Getting Started.md'
'Safety.md'
'Installation.md'
'Configuration.md'
'Cli.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'
'Autotune.md'
'Blackbox.md'
'Migrating from baseflight.md'
'Boards.md'
'Board - AlienFlight.md'
'Board - CC3D.md'
'Board - CJMCU.md'
'Board - Naze32.md'
'Board - Sparky.md'
'Board - Olimexino.md'
'Board - ChebuzzF3.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
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