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 2306 for branches – NEMO

Changeset 2306 for branches


Ignore:
Timestamp:
2010-10-25T16:36:50+02:00 (14 years ago)
Author:
flavoni
Message:

correct a small bug fix in add_key option for makenemo, see ticket #740

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/nemo_v3_3_beta/NEMOGCM/TOOLS/COMPILE/Fadd_keys.sh

    r2302 r2306  
    6363 echo "Adding keys in : ${NEW_CONF}"  
    6464 for i in ${list_add_key} ; do 
    65    if [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "$i" )" -ne 0 ] ; then 
    66       if [ "$i" == "key_proci" || "$i" == "key_procij" ] ; then 
    67          sed -e "s/key_proc[ij]=.* / ${i} /"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 
    68                mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 
    69       fi 
     65   if [ "$(echo ${i} | grep -c key_proc )" -ne 0 ] ; then 
     66      sed -e "s/key_proc[ij]=.* //"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 
     67            mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 
     68      echo " " 
     69      sed -e "s/$/ ${i}/"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 
     70            mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 
     71   elif [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "$i" )" -ne 0 ] ; then 
    7072   echo "key $i already present in cpp_${NEW_CONF}.fcm"  
    7173   else 
Note: See TracChangeset for help on using the changeset viewer.