source:
NEMO/trunk/doc/manual_build.sh
@
11120
Last change on this file since 11120 was 11120, checked in by nicolasmartin, 5 years ago | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[9407] | 1 | #!/bin/sh |
2 | ||
[11004] | 3 | ## Initialisation |
4 | ##--------------- | |
[9407] | 5 | |
[11004] | 6 | ## latekmk options |
[11120] | 7 | opts='-shell-escape -pdf -quiet' |
8 | export openout_any='a' | |
[10474] | 9 | |
[11004] | 10 | ## Default selection for models |
11 | if [ "$1" = 'all' ]; then | |
[11120] | 12 | models='NEMO SI3 TOP' |
[11004] | 13 | elif [ "$1" = '' ]; then |
[11120] | 14 | models='NEMO' |
[11004] | 15 | else |
[11120] | 16 | models=$* |
[11004] | 17 | fi |
[10146] | 18 | |
[11004] | 19 | # Source shared functions |
20 | . tools/shr_func.sh | |
[10146] | 21 | |
22 | ||
[11004] | 23 | ## Check dependancies |
24 | ##------------------- | |
[10474] | 25 | |
[11004] | 26 | ## LaTeX installation, find latexmk should be enough |
[11120] | 27 | [ -z $( which latexmk ) ] && { echo 'latexmk not installed => QUIT'; exit 2; } |
[10474] | 28 | |
[11120] | 29 | ## Pygments package for syntax highlighting of source code (namelists & snippets) |
30 | [ -n "$( ./tools/check_pkg.py pygments )" ] && { echo 'Python pygments is missing => QUIT'; exit 2; } | |
31 | ||
[11004] | 32 | ## Retrieve figures if not already there |
33 | if [ ! -d latex/figures ]; then | |
[11120] | 34 | printf "Downloading of shared figures and logos\n\n" |
35 | svn co https://forge.ipsl.jussieu.fr/nemo/svn/utils/figures latex/figures > /dev/null | |
[11004] | 36 | fi |
[10610] | 37 | |
[10146] | 38 | |
[11004] | 39 | ## Loop on the models |
40 | ##------------------- | |
41 | ||
42 | for model in $models; do | |
[11120] | 43 | echo $model |
44 | clean $model | |
45 | build $model | |
46 | printf "\t¤ End of building run\n" | |
47 | printf "\t The export should be available at root\n" | |
48 | printf "\t If not check LaTeX log in ./latex/$model/build/${model}_manual.log\n" | |
49 | echo | |
[11004] | 50 | done |
51 | ||
[9407] | 52 | exit 0 |
Note: See TracBrowser
for help on using the repository browser.