#!/bin/bash

## Check dependencies
##-------------------

## Sphinx, BibTeX extension and "Read The Docs" theme
if [ -n "$( ./check_pkg.py sphinx sphinxcontrib.bibtex sphinx_rtd_theme )" ]; then
    echo 'One of the Python dependencies is missing => QUIT'
    exit 2
fi

echo "¤ Clean previous build"
make clean
echo

echo "¤ Generation of the guide"
make html > /dev/null
echo

echo "¤ End of HTML building"
echo ""
echo "open ./build/html/index.html"

exit 0
