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 12238 – NEMO

Changeset 12238


Ignore:
Timestamp:
2019-12-13T10:27:58+01:00 (4 years ago)
Author:
mathiot
Message:

stop sette execution if one of the namelist variable cannot be updated in namelist cfg because of missing namelist group #2304

File:
1 edited

Legend:

Unmodified
Added
Removed
  • utils/CI/sette_ticket2304/all_functions.sh

    r11161 r12238  
    163163                sed --posix "/${NAMGRP} /a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp || gsed --posix "/${NAMGRP} /a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 
    164164# if file not empty replace ${EXE_DIR}/$1 
     165                # check if namelist group present in namelist_cfg 
     166                NGRP=$(grep ${NAMGRP} ${EXE_DIR}/$1 | wc -l ) 
     167                if [ ${NGRP} -eq 0 ]; then 
     168                   echo '' 
     169                   echo "+++++ Cannot update ${2} because group ${NAMGRP} is missing in ${EXE_DIR}/$1  +++++ "       
     170                   echo '' 
     171                   exit 42 
     172                fi 
    165173                if [ -s ${EXE_DIR}/$1.tmp ] ; then 
    166174                   mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1  
Note: See TracChangeset for help on using the changeset viewer.