Changeset 10568
- Timestamp:
- 2019-01-24T15:10:59+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/doc/bin/manuals_checking.sh
r10550 r10568 9 9 fi 10 10 11 extract_arg() {12 ## $1: macro name, $2: prefix for filtering args (optional)13 eval grep -Poh "\\$1{\\$2\\\K[^}]+" ${tex_files} | tr -d '\\' | sort -u14 }15 16 11 for model in $models; do 17 12 [[ $model =~ ^(SI3|TOP)$ ]] && continue 18 13 19 tex_files=$( find latex/$model -type f -name *.tex )14 files=$( find latex/$model -type f -name *.tex ) 20 15 21 16 echo '¤ Missing namelist groups in '$model' manual' 22 17 23 18 for nlst in $( ls namelists ); do 24 [[ ! $( grep \\nlst{$nlst} $ {tex_files}) ]] && printf '%s ' $nlst19 [[ ! $( grep \\nlst{$nlst} $files ) ]] && printf '%s ' $nlst 25 20 done 26 21 27 22 echo; echo 28 echo '¤ Chapters with vanishedentries in '$model' manual (\{hf,jp,key,mdl,ngn,nlst,np,rou}{...})'23 echo '¤ Vanished index entries in '$model' manual (\{hf,jp,key,mdl,ngn,nlst,np,rou}{...})' 29 24 30 for file in $ {tex_files}; do25 for file in $files; do 31 26 32 27 items=$( grep -Eho "(hf|jp|key|mdl|ngn|nlst|np|rou){[a-zA-Z0-9_\]*}" $file | sort -u ) 33 28 34 [[ $items == '' ]] && continue 35 36 printf $file': ' 29 if [[ $items == '' ]]; then 30 continue 31 else 32 printf ${file/latex\/*\/subfiles\/}': ' 33 fi 37 34 38 35 for item in $items; do 39 36 40 if [[ ( $item =~ 'hf' && ! $( find ../src -type f -name $arg.h90 ) ) || \ 41 ( $item =~ 'jp' && ! $( grep ":: *$arg" ../src/OCE/par_oce.F90 ) ) || \ 42 ( $item =~ 'key' && ! $( grep -ri "#if .* $arg" ../src ) ) || \ 43 ( $item =~ 'mdl' && ! $( find ../src -type f -name $arg.[Ff]90 ) ) || \ 44 ( $item =~ 'ngn' && ! $( grep \&$arg namelists/* ) ) || \ 45 ( $item =~ 'nlst' && ! -f namelists/$arg ) || \ 46 ( $item =~ 'np' && ! $( grep " $arg *=" namelists/* ) ) || \ 47 ( $item =~ 'rou' && ! $( grep -ri "SUBROUTINE *$arg" ../src ) ) ]]; then 37 arg=$( echo $item | sed 's/.*{\([^}]*\)}/\1/' | tr -d '\\' ) 38 39 if [[ ( $item =~ ^hf && ! $( find ../src -type f -name $arg.h90 ) ) || \ 40 ( $item =~ ^jp && ! $( grep ":: *$arg" ../src/OCE/par_oce.F90 ) ) || \ 41 ( $item =~ ^key && ! $( grep -ri "#if .* $arg" ../src ) ) || \ 42 ( $item =~ ^mdl && ! $( find ../src -type f -name $arg.[Ff]90 ) ) || \ 43 ( $item =~ ^ngn && ! $( grep \&$arg namelists/* ) ) || \ 44 ( $item =~ ^nlst && ! -f namelists/$arg ) || \ 45 ( $item =~ ^np && ! $( grep " $arg *=" namelists/* ) ) || \ 46 ( $item =~ ^rou && ! $( grep -ri "SUBROUTINE *$arg" ../src ) ) ]]; then 48 47 printf $item' ' 49 48 fi
Note: See TracChangeset
for help on using the changeset viewer.