New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 10550 for NEMO/trunk – NEMO

Changeset 10550 for NEMO/trunk


Ignore:
Timestamp:
2019-01-18T17:12:34+01:00 (5 years ago)
Author:
nicolasmartin
Message:

Modify script checking the LaTeX files to report the ones to be updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/trunk/doc/bin/manuals_checking.sh

    r10448 r10550  
    2626 
    2727    echo; echo 
    28     echo '¤ Vanished references in '$model' manual (\\autoref{...})' 
     28    echo '¤ Chapters with vanished entries in '$model' manual (\{hf,jp,key,mdl,ngn,nlst,np,rou}{...})' 
    2929 
    30     for item in 'mdl' 'ngn' 'nlst' 'np' 'rou'; do 
    31         echo '- '$item':' 
    32         args_list=$( extract_arg $item ) 
     30    for file in ${tex_files}; do 
    3331 
    34         for arg in ${args_list}; do 
     32        items=$( grep -Eho "(hf|jp|key|mdl|ngn|nlst|np|rou){[a-zA-Z0-9_\]*}" $file | sort -u ) 
    3533 
    36             if   [[ "$item" == 'nlst' && ! -f namelists/$arg ]]; then 
    37                 printf '%15s: ' $arg 
    38                 grep -l \\nlst{$arg} ${tex_files} | sed 's/^.*\///' 
    39             elif [[ ( "$item" == 'mdl' && ! $( find ../src -type f -name $arg.[Ffh]90  ) ) || \ 
    40                     ( "$item" == 'ngn' && ! $( grep     \&$arg             namelists/* ) ) || \ 
    41                     ( "$item" == 'rou' && ! $( grep -ri "SUBROUTINE *$arg" ../src      ) ) || \ 
    42                     ( "$item" == 'np'  && ! $( grep     " $arg *="         namelists/* ) )      ]]; then 
    43                 printf '%s ' $arg 
     34        [[ $items == '' ]] && continue 
     35 
     36        printf $file': ' 
     37 
     38        for item in $items; do 
     39 
     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 
     48                printf $item' ' 
    4449            fi 
    45          
     50 
    4651        done 
    4752 
    48         [ "$item" != 'nlst' ] && echo 
    49     done 
     53        echo 
     54 
     55    done 
    5056 
    5157done 
Note: See TracChangeset for help on using the changeset viewer.