4a54fe9681
Build books the same way we build them for publishing: Build all three variants of the Install Guides if we check building. Since we introduce os specific sections, the guide might build for one variant but not the others. In case of failure, the variant is shown like: Building all queued 1 books now... >>> Build of book install-guide (for Ubuntu) failed (returncode = 1). Also, generate the xml file for the HA guide and build it. Add generated file bk-ha-guide.xml to .gitignore Add parameter -B for building to mvn to silence download progress Run test.py and validate.py through pep8 and fix any issues Change-Id: Icfb4587e7c08050d1b65dddc5a3a810a8bf12f5a
26 lines
1022 B
Bash
Executable File
26 lines
1022 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script needs to be called from the doc/high-availibilty-guide
|
|
# directory!
|
|
|
|
# Find location of db4-upgrade-xsl:
|
|
if [ -e /usr/share/xml/docbook/stylesheet/docbook5/db4-upgrade.xsl ] ; then
|
|
DB_UPGRADE=/usr/share/xml/docbook/stylesheet/docbook5/db4-upgrade.xsl
|
|
elif [ -e /usr/share/xml/docbook/stylesheet/upgrade/db4-upgrade.xsl ] ; then
|
|
DB_UPGRADE=/usr/share/xml/docbook/stylesheet/upgrade/db4-upgrade.xsl
|
|
else
|
|
echo "db4-upgrade.xsl not found"
|
|
exit 1
|
|
fi
|
|
|
|
type -P asciidoc > /dev/null 2>&1 || { echo >&2 "asciidoc not installed. Aborting."; exit 1; }
|
|
type -P xsltproc > /dev/null 2>&1 || { echo >&2 "xsltproc not installed. Aborting."; exit 1; }
|
|
type -P xmllint > /dev/null 2>&1 || { echo >&2 "xmllint not installed. Aborting."; exit 1; }
|
|
|
|
asciidoc -b docbook -d book -o - ha-guide.txt | \
|
|
xsltproc -o - $DB_UPGRADE - | \
|
|
xmllint --format - | \
|
|
sed -e 's,<book,<book xml:id="bk-ha-guide",' | \
|
|
sed -e 's,<info,<?rax pdf.url="../openstack-ha-guide-trunk.pdf"?><info,' \
|
|
> bk-ha-guide.xml
|