#! /bin/sh

FILES="documentation.org scenario.org"

for file in $FILES
do
    echo " PDF  $file"
    emacs -nw --batch                                   \
          --eval "(require 'org)"                       \
          --eval "(require 'ox-latex)"                  \
          --eval "(load-file \"../tools/setup.el\")"    \
          --file ./$file                                \
          -f org-latex-export-to-pdf                    \

    echo " HTML $file"
    emacs -nw --batch                                   \
          --eval "(require 'org)"                       \
          --eval "(require 'ox-latex)"                  \
          --eval "(require 'ox-html)"                   \
          --eval "(load-file \"../tools/setup.el\")"    \
          --file ./$file                                \
          -f org-html-export-to-html
done
