aboutsummaryrefslogtreecommitdiffstats
path: root/doc/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'doc/build.sh')
-rw-r--r--doc/build.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/build.sh b/doc/build.sh
new file mode 100644
index 000000000..98d9039b9
--- /dev/null
+++ b/doc/build.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+
+cd $(dirname $0)/..
+
+$(command -v winpty) docker run --rm -t \
+ -v /$(pwd)://src \
+ -w //src/doc \
+ btdi/sphinx:py3-featured sh -c "$(cat <<-EOF
+pip install -r requirements.txt
+sphinx-build -T -b html -D language=en . _build/html
+sphinx-build -T -b latex -D language=en . _build/latex
+EOF
+)"
+
+$(command -v winpty) docker run --rm -t \
+ -v /$(pwd)://src \
+ -w //src/doc \
+ btdi/latex sh -c "$(cat <<-EOF
+cd _build/latex
+FILE=\"\`ls *.tex | sed -e 's/\.tex//'\`\"
+pdflatex -interaction=nonstopmode \$FILE.tex;
+makeindex -s python.ist \$FILE.idx;
+pdflatex -interaction=nonstopmode \$FILE.tex;
+EOF
+)"