/build/gen-release-doc.sh

http://bdremote-ng.googlecode.com/ · Shell · 76 lines · 46 code · 22 blank · 8 comment · 11 complexity · 8abc32766125dfac93e5b2cbace2abc4 MD5 · raw file

  1. #!/bin/bash
  2. # Versions.
  3. VER="0.5"
  4. REL="r127"
  5. # Where to find the files.
  6. WIKIDOCROOT=http://bdremote-ng.googlecode.com/svn-history/$REL/wiki
  7. # Wget stuff.
  8. WGET=`type -p wget`
  9. WGET_OPTIONS="-q"
  10. D=`pwd`
  11. # Utility used to convert google wiki files from SVN into html.
  12. # Slightly broken, needs patch in doc/tools.
  13. CONVERT="ruby -I $HOME/remote-svn/google-wiki-syntax $HOME/remote-svn/google-wiki-syntax/wiki_convertor.rb"
  14. # Delete/create directory.
  15. rm -fr bdremote-ng-$VER-doc
  16. mkdir -p bdremote-ng-$VER-doc
  17. GetDoc()
  18. {
  19. echo "Getting document $1.wiki .. "
  20. $WGET $WGET_OPTIONS $WIKIDOCROOT/$1.wiki -O $1
  21. return 0
  22. }
  23. ConvertDoc()
  24. {
  25. echo "Converting document $1 to html .. " && \
  26. $CONVERT $1 .
  27. return 0
  28. }
  29. # echo "Getting $WIKIDOCROOT/README.wiki .."
  30. DOCS="README Releases initscripts relproc"
  31. cd bdremote-ng-$VER-doc && \
  32. for DOC in `echo $DOCS`
  33. do
  34. GetDoc $DOC
  35. done
  36. echo "Downloading done .."
  37. for DOC in `echo $DOCS`
  38. do
  39. ConvertDoc $DOC
  40. done
  41. echo "Conversion done .."
  42. for DOC in `echo $DOCS`
  43. do
  44. rm -f $DOC
  45. done
  46. echo "Generating doxygen .. "
  47. cd ../../doc/ && \
  48. rm -fr html && \
  49. doxygen && \
  50. cd ../build/bdremote-ng-$VER-doc && \
  51. cp -r ../../doc/html doxygen && \
  52. echo "Generated doxygen .."
  53. cd .. && tar -cvjf bdremote-ng-$VER-doc.tar.bz2 bdremote-ng-$VER-doc
  54. exit 0