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 5091 for trunk/NEMOGCM/CONFIG/makenemo – NEMO

Ignore:
Timestamp:
2015-02-17T18:26:37+01:00 (9 years ago)
Author:
nicolasmartin
Message:

#1471 Correction of void arguments tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/CONFIG/makenemo

    r5072 r5091  
    200200       ;; 
    201201   add_key) 
    202        test $?2 || ( list_add_key=$2 && export ${list_add_key} ) 
     202       # Checking void argument 
     203       [ ! -z $2 ] && { list_add_key=$2; export ${list_add_key}; } 
    203204       shift 
    204205       ;; 
    205206   del_key) 
    206        test $?2 || ( list_del_key=$2 && export ${list_del_key} ) 
     207       # Checking void argument 
     208       [ ! -z $2 ] && { list_del_key=$2; export ${list_del_key}; } 
    207209       shift 
    208210       ;; 
     
    314316fi 
    315317 
    316 #- At this stage new configuration has been added, 
    317 #- We add or remove keys 
    318 if [ ${#list_add_key} -ne 0 ] ; then 
    319     . ${COMPIL_DIR}/Fadd_keys.sh ${NEW_CONF} add_key ${list_add_key} 
    320 fi 
    321  
    322 if [ ${#list_del_key} -ne 0 ] ; then 
    323     . ${COMPIL_DIR}/Fdel_keys.sh ${NEW_CONF} del_key ${list_del_key} 
    324 fi 
     318#- At this stage new configuration has been added, we add or remove keys 
     319[ ! -z ${list_add_key} ] && { . ${COMPIL_DIR}/Fadd_keys.sh ${NEW_CONF} add_key ${list_add_key}; } 
     320[ ! -z ${list_del_key} ] && { . ${COMPIL_DIR}/Fdel_keys.sh ${NEW_CONF} del_key ${list_del_key}; } 
     321exit 
    325322 
    326323#- check that all keys are really existing... 
Note: See TracChangeset for help on using the changeset viewer.