#!/usr/bin/env bash
set -e

ROOT=$(dirname "$0")/..

pip install --quiet --upgrade sphinx
make -C ${ROOT}/docs html

echo ""
INDEX_FILE="${ROOT}/docs/build/html/index.html"
echo "Documentation index file can be found at file://$(cd "$(dirname "${INDEX_FILE}")"; pwd)/$(basename "${INDEX_FILE}")"
