Fork from inav at github. Modified for some special functions needs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.2 KiB

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