#!/bin/sh

# the following changes are not for the base classes, so we temporatily
# move the relevant files to a separate directory
mkdir tmp_doxyfix
mv html/*Base*.html tmp_doxyfix/

perl -pi~ -e 's/Derived/VectorX/g' html/*VectorX*.html
perl -pi~ -e 's/VectorBase\<\/a\>\&lt\; T\, VectorX \&gt\;/VectorX\<\/a\>/g' html/*VectorX*.html

perl -pi~ -e 's/Derived/Vector/g' html/*Vector*.html
perl -pi~ -e 's/VectorBase\<\/a\>\&lt\; T\, Vector \&gt\;/Vector\<\/a\>/g' html/*Vector*.html

perl -pi~ -e 's/Derived/MatrixX/g' html/*MatrixX*.html

perl -pi~ -e 's/Derived/Matrix/g' html/*Matrix*.html

perl -pi~ -e 's/VectorType/VectorX\&lt\;T\&gt\;/g' html/*MatrixX*.html
perl -pi~ -e 's/VectorType/Vector\&lt\;T\,Size\&gt\;/g' html/*Matrix*.html

perl -pi~ -e 's/VectorType/VectorX\&lt\;T\&gt\;/g' html/*LinearSolverX*.html
perl -pi~ -e 's/VectorType/Vector\&lt\;T\,Size\&gt\;/g' html/*LinearSolver*.html

perl -pi~ -e 's/namespaceEigen/modules/' html/index.html

perl -pi~ -e 's/iso-8859-1/utf-8/' html/index.html

# move the files of the base classes back to html/
# and delete temporary directory
mv tmp_doxyfix/* html/
rmdir tmp_doxyfix

# remove the backup files generated by perl
rm html/*~
