#! /bin/sh -x
#+
# .. program: gen_survey.sh
#
# =============
# gen_survey.sh
# =============
#
# DESCRIPTION
# ===========
#
# creation survey of the project
#
# SEE ALSO
# ========
#
# :ref:`bibtropflux.xml`
# :ref:`usertropflux.xml`
# :ref:`usertropflux.dtd`
# :ref:`maintropflux.xml`
#
# :ref:`conf.py`
#
# TODO
# ====
#
# connect with Sphinx website (cp ++)
#
# make it work un der cratos : now no ploticus available
#
# This tool has to be call during website building ... so either in ./Makefile
# or in ../makefile
#
# hard coded superbib path (see export lines)
#
# EVOLUTIONS
# ==========
#
# $URL$
#
# $Id$
#
# - fplod 20110705T155755Z aedon.locean-ipsl.upmc.fr (Darwin)
#
#   * start to try to run sphinx-build
#
# - fplod 20110629T124711Z aedon.locean-ipsl.upmc.fr (Darwin)
#
#   * start usage of rest in superbib
#
# - fplod 20110624T142756Z aedon.locean-ipsl.upmc.fr (Darwin)
#
#   * creation (superdraft)
#
#-
# exports should not be here ++
export SUPERBIB=${HOME}/SUPERBIB
export SUPERBIB=${HOME}/superbib_ws/trunk/
cd ${SUPERBIB}
export DIRTMP=./
make clean
make before
ln -sf ${TROPFLUX}/adm/website/bibtropflux.xml ${DIRTMP}/biblio.xml
ln -sf ${TROPFLUX}/adm/website/usertropflux.xml ${DIRTMP}/user.xml
ln -sf ${TROPFLUX}//adm/website/usertropflux.dtd ${DIRTMP}/user.dtd
ln -sf ${TROPFLUX}/adm/website/maintropflux.xml ${DIRTMP}/main.xml
make html
#++make rest
#++make /tmp/superbib/sphinx_tmpdir//user.rst
make /tmp/superbib/sphinx_tmpdir//superbib01.rst
#find /tmp/superbib/ . -name "*.rst"
cd ${TROPFLUX}/adm/website
cp /tmp/superbib/sphinx_tmpdir//superbib01.rst .
#sphinx-build -b html -c . /tmp/superbib/ /tmp
make html
#cp ++ _static/survey.png
#++ make -n install
#++install.sh -w /tmp/superbib/ -u http://www.locean-ipsl.upmc.fr/~fplod/supertropflux/
#
exit 0
