Tools used by OpenStack Documentation
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.
 
 
 
 

26 lines
1022 B

  1. #!/bin/bash
  2. # This script needs to be called from the doc/high-availibilty-guide
  3. # directory!
  4. # Find location of db4-upgrade-xsl:
  5. if [ -e /usr/share/xml/docbook/stylesheet/docbook5/db4-upgrade.xsl ] ; then
  6. DB_UPGRADE=/usr/share/xml/docbook/stylesheet/docbook5/db4-upgrade.xsl
  7. elif [ -e /usr/share/xml/docbook/stylesheet/upgrade/db4-upgrade.xsl ] ; then
  8. DB_UPGRADE=/usr/share/xml/docbook/stylesheet/upgrade/db4-upgrade.xsl
  9. else
  10. echo "db4-upgrade.xsl not found"
  11. exit 1
  12. fi
  13. type -P asciidoc > /dev/null 2>&1 || { echo >&2 "asciidoc not installed. Aborting."; exit 1; }
  14. type -P xsltproc > /dev/null 2>&1 || { echo >&2 "xsltproc not installed. Aborting."; exit 1; }
  15. type -P xmllint > /dev/null 2>&1 || { echo >&2 "xmllint not installed. Aborting."; exit 1; }
  16. asciidoc -b docbook -d book -o - ha-guide.txt | \
  17. xsltproc -o - $DB_UPGRADE - | \
  18. xmllint --format - | \
  19. sed -e 's,<book,<book xml:id="bk-ha-guide",' | \
  20. sed -e 's,<info,<?rax pdf.url="../openstack-ha-guide-trunk.pdf"?><info,' \
  21. > bk-ha-guide.xml