openstack-manuals/tools/build-install-guides-rst.sh
Andreas Jaeger 25d1b7d617 Remove DocBook XML files for Install Guide
Remove DocBook XML files and rename directory from install-guide-rst to
install-guide.

Adjust everything so that publishing works.
Update README to remove DocBook XML Install Guide specific instructions.

Implements: blueprint installguide-liberty
Change-Id: If723c44c3c0383dc8ab8e53798d82e7f0ee2cc57
2015-08-19 16:35:31 +02:00

24 lines
777 B
Bash
Executable File

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