#!/bin/bash

# exit-on-error
set -e

echo "---- running latex2html on test data ----"
echo

if latex2html -dir "$AUTOPKGTEST_TMP" tests/l2htest
then echo
     echo "---- latex2html ran successfully ----"
else
    echo
    echo "---- latex2html exited with an error state ----"
    exit 1
fi


echo "---- testing for broken links ----"
echo

if linkchecker "$AUTOPKGTEST_TMP"/index.html
then echo
     echo "---- no broken links ----"
else
    echo
    echo "---- linkchecker exited with an error state ----"
    exit 1
fi
