#!/bin/bash
mkdir -p build
ln -s build/Kleene_S.K.-Vvedenie_v_metamatematiku[1957y]-russian.log Kleene_S.K.-Vvedenie_v_metamatematiku[1957y]-russian.log
cp bibliography.bib build/
cp index_style_and_order.xdy build/
xelatex -interaction=nonstopmode -output-directory build 'Kleene_S.K.-Vvedenie_v_metamatematiku[1957y]-russian.tex'
xelatex -interaction=nonstopmode -output-directory build 'Kleene_S.K.-Vvedenie_v_metamatematiku[1957y]-russian.tex'

cd build
makeindex 'Kleene_S.K.-Vvedenie_v_metamatematiku[1957y]-russian.idx'
xindy -C utf8 -M texindy -L russian -M index_style_and_order 'Kleene_S.K.-Vvedenie_v_metamatematiku[1957y]-russian.idx'
biber 'Kleene_S.K.-Vvedenie_v_metamatematiku[1957y]-russian'
cd ..
xelatex -interaction=nonstopmode -output-directory build 'Kleene_S.K.-Vvedenie_v_metamatematiku[1957y]-russian.tex'

cd build
biber 'Kleene_S.K.-Vvedenie_v_metamatematiku[1957y]-russian'
cd ..
xelatex -interaction=nonstopmode -output-directory build 'Kleene_S.K.-Vvedenie_v_metamatematiku[1957y]-russian.tex'
