#!/bin/bash
mkdir -p build
cp index_style_and_order.xdy build/
xelatex -interaction=nonstopmode -output-directory build 'Kernigan_B.W.,Ritchie_D.M.-Yazyk_programmirovaniya_Si[2nd_ed][1992y]-russian.tex'
xelatex -interaction=nonstopmode -output-directory build 'Kernigan_B.W.,Ritchie_D.M.-Yazyk_programmirovaniya_Si[2nd_ed][1992y]-russian.tex'
cd build
makeindex 'Kernigan_B.W.,Ritchie_D.M.-Yazyk_programmirovaniya_Si[2nd_ed][1992y]-russian.idx'
xindy -C utf8 -M texindy -L russian -M index_style_and_order 'Kernigan_B.W.,Ritchie_D.M.-Yazyk_programmirovaniya_Si[2nd_ed][1992y]-russian.idx'
cd ..
xelatex -interaction=nonstopmode -output-directory build 'Kernigan_B.W.,Ritchie_D.M.-Yazyk_programmirovaniya_Si[2nd_ed][1992y]-russian.tex'