Ignore:
Timestamp:
2011-02-10T09:32:37+01:00 (10 years ago)
Author:
flavoni
Message:

small modifications for SETTE, see ticket #796

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/TOOLS/COMPILE/Fdel_keys.sh

    r2520 r2584  
    6060# 
    6161#- 
    62  echo "Removing keys in : ${NEW_CONF}"  
    63  sed -e "s/${list_del_key}//"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 
    64  mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 
    65  echo "removed keys ${list_del_key} in ${NEW_CONF}"  
     62 echo "Removing keys in : ${NEW_CONF}" 
     63 for i in ${list_del_key} ; do 
     64        if [ "$(echo ${i} | grep -c key_nproc )" -ne 0 ] ; then 
     65           sed -e "s/key_nproc[ij]=.* //"  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm >  ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp 
     66                mv ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm.tmp   ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm 
     67                echo " " 
     68        elif [ "$(cat ${CONFIG_DIR}/${NEW_CONF}/cpp_${NEW_CONF}.fcm | grep -c "$i" )" -ne 0 ] ; then 
     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         echo "deleted key $i in ${NEW_CONF}" 
     72        fi 
     73 done 
    6674 
    6775 unset -v list_del_key 
Note: See TracChangeset for help on using the changeset viewer.