source:
utils/CI/sette_ticket1927/sette_list_avail_rev.sh
@
13248
Last change on this file since 13248 was 11161, checked in by mathiot, 5 years ago | |
---|---|
|
|
File size: 1.7 KB |
Line | |
---|---|
1 | #!/bin/bash -f |
2 | # set -vx |
3 | # |
4 | lst_rev () { |
5 | # get the list of revision available for a configuration |
6 | if [ ! -d $1 ] ; then |
7 | CFGLST=-9999 |
8 | else |
9 | CFGLST=`ls $1 | sort -u -r ` |
10 | fi |
11 | # config name |
12 | CONFIG=$2 |
13 | # list of all revision available |
14 | ALLLST=${@:3} |
15 | # number of revision total and for CONFIG |
16 | nrevall=`echo $ALLLST | wc -w` |
17 | nrevcfg=`echo $CFGLST | wc -w` |
18 | # display |
19 | echo "" |
20 | printf "%-27s : " $CONFIG |
21 | irev=1 |
22 | irevcfg=1 |
23 | while [[ $irev -le $nrevall ]] ; do |
24 | rev=`echo $ALLLST | cut -d\ -f ${irev}` |
25 | cfgrev=`echo $CFGLST | cut -d\ -f ${irevcfg}` |
26 | if [ $cfgrev == $rev ] ; then |
27 | printf "%-6s " $rev |
28 | irevcfg=$((irevcfg+1)) |
29 | else |
30 | printf "%-5s " "***** " |
31 | fi |
32 | irev=$((irev+1)) |
33 | done |
34 | } |
35 | |
36 | SETTE_DIR=$(cd $(dirname "$0"); pwd) |
37 | MAIN_DIR=$(dirname $SETTE_DIR) |
38 | . ./param.cfg |
39 | |
40 | mach=${COMPILER} |
41 | NEMO_VALID=${NEMO_VALIDATION_DIR} |
42 | |
43 | # list of all revision available |
44 | DIRLST=`find ${NEMO_VALID} -maxdepth 3 -mindepth 3 -type d | sed -e 's/.*\/W.*\///' | sort -u -r` |
45 | |
46 | # display header |
47 | echo "" |
48 | echo " Compiler used is : $COMPILER" |
49 | echo "" |
50 | printf " List of all avail. rev. is : " |
51 | for dir in `echo $DIRLST`; do printf "%5s " $dir ; done |
52 | printf "\n" |
53 | |
54 | # start checking configuration revision |
55 | echo "" |
56 | echo " !---- check revision available for each configuration ----! " |
57 | for CONFIG in WGYRE_PISCES_ST WORCA2_ICE_PISCES_ST WORCA2_OFF_PISCES_ST WAMM12_ST WORCA2_SAS_ICE_ST WAGRIF_DEMO_ST WSPITZ12_ST WISOMIP_ST WOVERFLOW_ST WLOCK_EXCHANGE_ST WVORTEX_ST WICE_AGRIF_ST |
58 | do |
59 | DIR=${NEMO_VALIDATION_DIR}/${CONFIG}/${COMPILER} |
60 | lst_rev $DIR $CONFIG $DIRLST |
61 | done |
62 | printf "\n" |
63 | printf "\n" |
64 | # |
65 | exit |
Note: See TracBrowser
for help on using the repository browser.