#!/bin/sh

set -e

if [ -n "$AUTOPKGTEST_TMP" ]; then
        TMP=`mktemp -q -d -p $AUTOPKGTEST_TMP`
else
        TMP=`mktemp -q -d`
fi
SOURCE_TREE=`pwd`

cd $TMP
libreoffice --headless --convert-to tex:org.openoffice.da.writer2latex $SOURCE_TREE/source/distro/doc/user-manual.odt

# ends up needing supertabular (that's why we depend on texlive-latex-extra), but
# doesn't work in sid, see https://tex.stackexchange.com/questions/750538/supertabular-became-wrong-in-texlive-2025-06-02
#cp -v $SOURCE_TREE/source/distro/doc/w2llogo.png .
#pdflatex user-manual.tex

