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 12569 for utils/CI/sette/sette_list_avail_rev.sh – NEMO

Ignore:
Timestamp:
2020-03-18T12:22:56+01:00 (4 years ago)
Author:
mathiot
Message:

ticket #2304: merge branch sette_ticket2304 into sette (thank you Simon for the review and all the suggestions you made). It include synchronisation and cleaning option between the REF config and the _ST config to ease the work when the reference configurations are changed and display bug in sette_check_avail_rev

File:
1 edited

Legend:

Unmodified
Added
Removed
  • utils/CI/sette/sette_list_avail_rev.sh

    r11161 r12569  
    11#!/bin/bash -f 
    22# set -vx 
     3 
     4SETTE_DIR=$(cd $(dirname "$0"); pwd) 
     5MAIN_DIR=$(dirname $SETTE_DIR) 
     6 
     7. ./param.cfg 
     8 
     9if [ $# -gt 0 ]; then 
     10  while getopts c:h option; do  
     11     case $option in 
     12        c) COMPILER=$OPTARG;; 
     13        h | *) echo '' 
     14               echo 'sette_list_avail_rev.sh : '  
     15               echo '     list all sette directory and available revisions created with the compiler specified in param.cfg or in the startup file)' 
     16               echo '-c COMPILER_name :' 
     17               echo '     list all sette directory and available revisions created with the compiler specified' 
     18               echo '' 
     19               exit 42;; 
     20     esac 
     21  done 
     22  shift $((OPTIND - 1)) 
     23fi 
     24 
    325# 
    426lst_rev () { 
     
    2446       rev=`echo $ALLLST | cut -d\  -f ${irev}` 
    2547       cfgrev=`echo $CFGLST | cut -d\  -f ${irevcfg}` 
     48       if [ -z $cfgrev ] ; then cfgrev=-9999 ; fi 
    2649       if [ $cfgrev == $rev ] ; then 
    2750          printf "%-6s  " $rev 
     
    3457} 
    3558 
    36   SETTE_DIR=$(cd $(dirname "$0"); pwd) 
    37   MAIN_DIR=$(dirname $SETTE_DIR) 
    38   . ./param.cfg 
    3959 
    40   mach=${COMPILER} 
    41   NEMO_VALID=${NEMO_VALIDATION_DIR} 
     60  NEMO_VALID=${NEMO_VALIDATION_DIR}/ 
    4261  
    4362 # list of all revision available 
    44  DIRLST=`find ${NEMO_VALID} -maxdepth 3 -mindepth 3 -type d | sed -e 's/.*\/W.*\///' | sort -u -r` 
     63 DIRLST=`find ${NEMO_VALID} -maxdepth 3 -mindepth 3 -type d -regex ".*\/W.*\/${COMPILER}\/.*" | sed -e "s/.*\/W.*\/${COMPILER}\///" | sort -u -r` 
    4564 
    4665 # display header 
     
    4968 echo "" 
    5069 printf " List of all avail. rev. is : " 
    51  for dir in `echo $DIRLST`; do printf "%5s  " $dir ; done 
     70 for dir in `echo $DIRLST`; do printf "%-6s  " $dir ; done 
    5271 printf "\n" 
    5372 
Note: See TracChangeset for help on using the changeset viewer.