set -ve

script=$(readlink -f "$0")

tmpdir=$(mktemp -d)

sudo apt-get install \
    fonts-sil-doulos \
    lmodern \
    fonts-lmodern \
    texlive-science \
    texlive-fonts-recommended \
    texlive-fonts-extra \
    texlive-xetex \
    texlive-latex-recommended \
    texlive-extra-utils

pushd "$tmpdir"
    git clone https://github.com/fykosak/fks-texmf.git
    pushd fks-texmf
        version=$(git tag | sort -n | tail -n 1)
        git checkout "$version"
        make install DST=~/texmf
    popd
popd

rm -rf "$tmpdir"
