Ignore:
Timestamp:
09/10/10 17:02:35 (14 years ago)
Author:
mmaipsl
Message:

Correct AA_move-and-rename script. DODS calls are OK now.
Suppress sed on HEADER.html files because they are added by dods_cp command.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_move-and-rename

    r346 r349  
    206206    IGCM_debug_PushStack "MY_DODS_Cp" 
    207207 
     208    typeset old_JobName old_R_DODS 
    208209    IGCM_sys_Cd ${NEW_R_SAVE} 
    209210    old_JobName=${config_UserChoices_JobName} 
     211    old_R_DODS=${R_DODS} 
     212    old_R_SAVE=${R_SAVE} 
     213 
    210214    config_UserChoices_JobName=${NEW_JobName} 
     215    R_DODS=${NEW_R_DODS} 
     216    R_SAVE=${NEW_R_SAVE} 
     217 
    211218    IGCM_sys_Dods_Cp ${1} 
    212219    IGCM_debug_Print 3 "MY_DODS_Cp : ${config_UserChoices_JobName}/${1}" 
    213220    IGCM_sys_Cd ${RUN_DIR_PATH} 
     221 
    214222    config_UserChoices_JobName=${old_JobName} 
     223    R_DODS=${old_R_DODS} 
     224    R_SAVE=${old_R_SAVE} 
    215225 
    216226    IGCM_debug_PopStack "MY_DODS_Cp" 
     
    232242 
    233243if [ ! -d ${SUBMIT_DIR} ]; then 
    234     IGCM_debug_Print 0 "No ${SUBMIT_DIR}, we stop here" 
     244    IGCM_debug_Print 1 "No ${SUBMIT_DIR}, we stop here" 
    235245    exit 1 
    236246fi 
     
    283293IGCM_debug_Print 1 "Move ${R_SAVE} to ${NEW_R_SAVE}" 
    284294if [ -d ${NEW_R_SAVE} ] ; then 
    285     IGCM_debug_Print 0 "ERROR : ${NEW_R_SAVE} directory already exist !" 
    286     IGCM_debug_Print 0 "We won't try to  We stop here." 
     295    IGCM_debug_Print 1 "ERROR : ${NEW_R_SAVE} directory already exist !" 
     296    IGCM_debug_Print 1 "We won't try to  We stop here." 
    287297    exit 1 
    288298fi 
     
    290300 
    291301#DEFINE NEW_R_DODS 
    292 if [ -d ${R_DODS} ] ; then 
    293     NEW_R_DODS=${NEW_SAVE} 
    294 fi 
     302NEW_R_DODS=${NEW_SAVE}/${NEW_JobName} 
    295303 
    296304# Define NEW_REBUILD_DIR 
     
    330338unset listfiles 
    331339set +A listfiles -- $( find ${OutinDir} -type f -name "run.card\.[0-9]*\.[0-9]*" ) 
    332 IGCM_sys_Cp ${listfiles[*]} ${OutNEWDir} 
    333 IGCM_sys_Rm -f ${listfiles[*]} 
     340if [ ${#listfiles[*]} -gt 0 ] ; then 
     341    IGCM_sys_Cp ${listfiles[*]} ${OutNEWDir} 
     342    IGCM_sys_Rm -f ${listfiles[*]} 
     343fi 
    334344 
    335345# Move and Rename OLD Script_Output 
     
    456466            MY_DODS_Cp ${comp}/Analyse/SE 
    457467        fi 
     468 
     469        MY_DODS_Rm ${comp}/Analyse 
     470        MY_DODS_Rm ${comp} 
    458471    else 
    459472        IGCM_debug_Print 2 "nothing to do without Analyse." 
    460473    fi 
    461474 
    462     MY_DODS_Rm ${comp}/Analyse 
    463     MY_DODS_Rm ${comp} 
    464475done 
    465476 
     
    484495if [ $? = 0 ] ; then 
    485496    IGCM_sys_MkdirArchive ${NEW_R_SAVE}/${R_MONITORING} 
    486     IGCM_sys_MkdirArchive ${NEW_R_SAVE}/${R_MONITORING}/html 
    487     IGCM_sys_MkdirArchive ${NEW_R_SAVE}/${R_MONITORING}/files 
    488     IGCM_sys_MkdirArchive ${NEW_R_SAVE}/${R_MONITORING}/progress 
    489     IGCM_sys_MkdirArchive ${NEW_R_SAVE}/${R_MONITORING}/images 
    490497    REPLACE_sed ${R_SAVE}/${R_MONITORING}/index.html ${NEW_R_SAVE}/${R_MONITORING} 
    491     REPLACE_sed ${R_SAVE}/${R_MONITORING}/HEADER.html ${NEW_R_SAVE}/${R_MONITORING} 
    492     REPLACE_sed ${R_SAVE}/${R_MONITORING}/files/HEADER.html ${NEW_R_SAVE}/${R_MONITORING}/files 
    493     REPLACE_sed ${R_SAVE}/${R_MONITORING}/html/HEADER.html ${NEW_R_SAVE}/${R_MONITORING}/html 
    494     REPLACE_sed ${R_SAVE}/${R_MONITORING}/progress/HEADER.html ${NEW_R_SAVE}/${R_MONITORING}/progress 
    495     REPLACE_sed ${R_SAVE}/${R_MONITORING}/images/HEADER.html ${NEW_R_SAVE}/${R_MONITORING}/images 
    496498    REPLACE_sed ${R_SAVE}/${R_MONITORING}/run.card ${NEW_R_SAVE}/${R_MONITORING} 
    497499    REPLACE_sed ${R_SAVE}/${R_MONITORING}/config.card ${NEW_R_SAVE}/${R_MONITORING} 
Note: See TracChangeset for help on using the changeset viewer.