performance-docs/tools/build_pdf.sh
Ilya Shakhat f9d4e0e078 Re-organize doc building
* Split out PDF building into a separate tox target
* Run HTML builder the same way as by Infra
* Omit Latex builder as it's not used

Change-Id: Idae8ce297fdcc05141749d31f343cb29ce89ca66
2016-03-31 19:03:13 +03:00

12 lines
283 B
Bash
Executable File

#!/bin/bash -xe
# copy sources to temporary folder
TEMP_DIR="$(mktemp -d)"
cp -r doc/source/* ${TEMP_DIR}
# convert SVG to PNG
find ${TEMP_DIR} -name *svg | sed "s/\.svg$//" | xargs -I% cairosvg "%.svg" -f pdf -o "%.pdf"
# run Sphinx
sphinx-build -b pdf ${TEMP_DIR} doc/build/pdf