#! /bin/sh -

set -e
set -x

echo "Regenerating pkgmanagement.html containing qi.html ..."
txt2tags -t html pkgmanagement.t2t

rm -rf html_node
mkdir html_node

htmldoc -t html -d html_node \
 --no-title \
 --toclevels 2 \
 --toctitle "Dragora Documentation" \
 ./about.html ./installation.html ./configuration.html \
 ./pkgmanagement.html

# Adjust main title

sed -i \
 -e 's#<TITLE>Qi user guide</TITLE>#<TITLE>Dragora Documentation</TITLE>#' \
 -e 's#Graft - a package management utility#Graft user guide#' \
 ./html_node/index.html

