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.

60 lines
1.1 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 - ColibriRace.md'
  32. 'Board - Motolab.md'
  33. 'Board - Paris Air Hero 32.md'
  34. 'Board - Sparky.md'
  35. 'Board - RMDO.md'
  36. 'Board - SPRacingF3.md'
  37. )
  38. if which gimli >/dev/null; then
  39. echo "Building ${filename}.pdf"
  40. pushd . >/dev/null
  41. cd docs
  42. rm -f ${filename}.md
  43. for i in "${doc_files[@]}"
  44. do
  45. cat "$i" >> ${filename}.md
  46. done
  47. rm -f ${filename}.pdf
  48. gimli -f ${filename}.md -stylesheet override.css \
  49. -w '--toc --title "Cleanflight Manual" --footer-right "[page]" --toc-depth 1'
  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
  57. fi