Merge "[install-guide] Add title for each distro"

This commit is contained in:
Jenkins 2015-07-23 05:24:25 +00:00 committed by Gerrit Code Review
commit 52471f0f2d
2 changed files with 12 additions and 13 deletions

View File

@ -1,12 +1,4 @@
.. only:: nonsense
.. TODO(ajaeger): Sphinx uses the first title it finds - ignoring
the only - to create the top most title. Therefore use this
version. This needs to be revised.
============================
OpenStack Installation Guide
============================
.. title:: OpenStack Installation Guide
.. only:: rdo
@ -16,9 +8,6 @@
.. only:: obs
.. title: OpenStack Installation Guide for openSUSE and SUSE Linux
Enterprise
===================================================================
OpenStack Installation Guide for openSUSE and SUSE Linux Enterprise
===================================================================
@ -29,7 +18,6 @@
OpenStack Installation Guide for Ubuntu
=======================================
Abstract
~~~~~~~~

View File

@ -2,11 +2,22 @@
mkdir -p publish-docs
title_org=$(grep "title::" doc/install-guide-rst/source/index.rst | \
awk '{print substr($0, index($0, "::")+3)}')
for tag in obs rdo ubuntu; do
GLOSSARY=""
if [[ ! -e doc/common-rst/glossary.rst ]] ; then
GLOSSARY="--glossary"
fi
title=$(grep -m 1 -A 5 ".. only:: ${tag}" \
doc/install-guide-rst/source/index.rst | \
sed -n 4p | sed -e 's/^ *//g')
sed -i -e "s/\.\. title::.*/.. title:: ${title}/" \
doc/install-guide-rst/source/index.rst
tools/build-rst.sh doc/install-guide-rst \
$GLOSSARY --tag ${tag} --target "draft/install-guide-rst-${tag}"
done
sed -i -e "s/\.\. title::.*/.. title:: ${title_org}/" \
doc/install-guide-rst/source/index.rst