Changeset 11004 for NEMO/trunk
- Timestamp:
- 2019-05-20T16:51:02+02:00 (5 years ago)
- Location:
- NEMO/trunk/doc
- Files:
-
- 3 added
- 1 deleted
- 3 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/doc/manual_build.sh
r10997 r11004 1 1 #!/bin/sh 2 2 3 export opts='-shell-escape -pdf -quiet' 4 model='NEMO' 3 ## Initialisation 4 ##--------------- 5 5 6 check_python_module() { 7 python -c " 8 import sys 9 try: 10 import $1 11 print('\nModule $1 is installed') 12 except ImportError: 13 print('\nModule $1 is NOT installed') 14 print('') 15 sys.exit(42)" 16 } 6 ## latekmk options 7 opts='-shell-escape -quiet' 17 8 18 clean() { 19 ## Delete latex build files 20 find latex -regextype posix-extended \ 21 -regex ".*\.(aux|bbl|blg|dvi|fdb|fls|idx|ilg|ind|log|maf|mtc|out|pdf|toc).*" \ 22 -exec rm {} \; 9 ## Default selection for models 10 if [ "$1" = 'all' ]; then 11 models='NEMO SI3 TOP' 12 elif [ "$1" = '' ]; then 13 models='NEMO' 14 else 15 models=$* 16 fi 23 17 24 ## Remove 'minted' directories 25 find latex -type d -name '_minted*' -exec rm -r {} \; 18 ## Avoid the use of shell builtin echo (for -e option) 19 alias echo='/bin/echo -e' 26 20 27 ## HTML exports 28 find latex -type d -name 'html*' -exec rm -r {} \; 29 } 21 # Source shared functions 22 . tools/shr_func.sh 30 23 31 build() {32 cd latex/$1/main33 latexmk $opts $1'_manual' > /dev/null34 mv $1'_manual'.pdf ../../..35 cd -36 }37 24 38 check_python_module pygments39 if [ $? -ne 0 ]; then echo 'Required python module pygments to correctly build the documentation is missing; exit 42'; echo ''; exit 42; fi 25 ## Check dependancies 26 ##------------------- 40 27 41 clean 28 ## LaTeX installation, find latexmk should be enough 29 [ -z $( which latexmk ) ] && { echo 'latexmk binary is not present => QUIT'; exit 2; } 42 30 43 [ ! -d figures ] && svn co http://forge.ipsl.jussieu.fr/nemo/svn/utils/figures 31 ## Retrieve figures if not already there 32 if [ ! -d latex/figures ]; then 33 echo "Downloading of shared figures and logos\n" 34 svn co https://forge.ipsl.jussieu.fr/nemo/svn/utils/figures latex/figures > /dev/null 35 fi 44 36 45 build $model 37 ## Pygments package for syntax highlighting of source code (namelists & snippets) 38 [ -n "$( ./tools/check_pkg.py pygments )" ] && { exit 2; } 39 40 41 ## Loop on the models 42 ##------------------- 43 44 for model in $models; do 45 echo $model"\n" 46 clean $model; build $model 47 echo "\t"'¤ End of build run' 48 echo "\t\t"'The export should be available at root' 49 echo "\t\t"'If not check LaTeX log in ./latex/'$model'/main/'$model'_manual.log'"\n" 50 done 46 51 47 52 exit 0 -
NEMO/trunk/doc/tools/nlsts_update.sh
r10990 r11004 104 104 ;; 105 105 *) 106 set -o posix106 #set -o posix 107 107 ;; 108 108 esac
Note: See TracChangeset
for help on using the changeset viewer.