#!/bin/bash

DOC=$PWD

cd ..
svn info --xml | grep revision | head -n 1 > revinfo.xml
sed -i "s/>//g" revinfo.xml
. revinfo.xml
REV="r$revision"
rm revinfo.xml

cd $DOC
DOXYFILE="Doxyfile.$REV"
sed "s/rXXX/$REV/g" Doxyfile > $DOXYFILE

rm -rf src html latex
mkdir src
cp ../src/*.f90 ../ppsrc/src/*.f90 src
doxygen $DOXYFILE
rm $DOXYFILE

set -x
time lftp dubos@ftp.lmd.polytechnique.fr -e "mirror -R -P=10 html perso/DYNAMICO/$REV ; exit"
