aboutsummaryrefslogtreecommitdiffstats
path: root/doc/build.sh
blob: 98d9039b9429642e3066436f5eb00bb8981436dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
)"