#!/bin/bash
mkdir -p build
cp index_style_and_order.xdy build/
xelatex -interaction=nonstopmode -output-directory build 'opencl_helpers_documentation-russian.tex'
xelatex -interaction=nonstopmode -output-directory build 'opencl_helpers_documentation-russian.tex'
cd build
makeindex 'opencl_helpers_documentation-russian.idx'
xindy -C utf8 -M texindy -L russian -M index_style_and_order 'opencl_helpers_documentation-russian.idx'
cd ..
xelatex -interaction=nonstopmode -output-directory build 'opencl_helpers_documentation-russian.tex'
xelatex -interaction=nonstopmode -output-directory build 'opencl_helpers_documentation-russian.tex'

xelatex -interaction=nonstopmode -output-directory build 'opencl_helpers_documentation-english.tex'
xelatex -interaction=nonstopmode -output-directory build 'opencl_helpers_documentation-english.tex'
cd build
makeindex 'opencl_helpers_documentation-english.idx'
xindy -C utf8 -M texindy -L russian -M index_style_and_order 'opencl_helpers_documentation-english.idx'
cd ..
xelatex -interaction=nonstopmode -output-directory build 'opencl_helpers_documentation-english.tex'
xelatex -interaction=nonstopmode -output-directory build 'opencl_helpers_documentation-english.tex'
