#!/bin/sh ## Initialisation ##--------------- ## latekmk options opts='-shell-escape -quiet -pdf' ## Default selection for models if [ "$1" = 'all' ]; then models='NEMO SI3 TOP' elif [ "$1" = '' ]; then models='NEMO' else models=$* fi # Source shared functions . tools/shr_func.sh ## Check dependancies ##------------------- ## LaTeX installation, find latexmk should be enough [ -z $( which latexmk ) ] && { echo 'latexmk binary is not present => QUIT'; exit 2; } ## Retrieve figures if not already there if [ ! -d latex/figures ]; then printf "Downloading of shared figures and logos\n\n" svn co https://forge.ipsl.jussieu.fr/nemo/svn/utils/figures latex/figures > /dev/null fi ## Pygments package for syntax highlighting of source code (namelists & snippets) [ -n "$( ./tools/check_pkg.py pygments )" ] && { exit 2; } ## Loop on the models ##------------------- for model in $models; do echo $model clean $model; build $model printf "\t¤ End of building run\n" printf "\t The export should be available at root\n" printf "\t If not check LaTeX log in ./latex/$model/main/${model}_manual.log\n" echo done exit 0