Changeset 403 for trunk/libIGCM/AA_clean_month
- Timestamp:
- 12/20/10 10:43:22 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libIGCM/AA_clean_month
r373 r403 2 2 #************************************************************** 3 3 # Author: Martial Mancip 4 # Contact: Marti l.Mancip__at__ipsl.jussieu.fr4 # Contact: Martial.Mancip__at__ipsl.jussieu.fr 5 5 # $Revision:: $ Revision of last commit 6 6 # $Author:: $ Author of last commit … … 57 57 done 58 58 59 IGCM_card_DefineArrayFromSection ${SUBMIT_DIR}/config.card Post 60 61 for option in ${config_Post[*]} ; do 62 IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card Post ${option} 63 done 64 59 65 IGCM_debug_Print 1 "DefineArrayFromOption : config_UserChoices" 60 66 IGCM_debug_PrintVariables 3 config_UserChoices_JobName … … 99 105 CountListFiles=${#ListFiles[@]} 100 106 107 # If exist, erase REBUILD DIR 108 PeriodDateBegin=$( IGCM_date_ConvertFormatToGregorian ${run_Configuration_PeriodDateBegin} ) 109 CountRebuildDir=0 110 if [ X${config_Post_RebuildFrequency} != X ] ; then 111 if [ X${config_Post_RebuildFromArchive} = Xtrue ] ; then 112 REBUILD_DIR=${R_SAVE}/TMP 113 set +A RebuildDir -- $( IGCM_sys_RshArchive "find ${REBUILD_DIR} -type d -name \"*${PeriodDateBegin}*\" " ) 114 else 115 REBUILD_DIR=${BIG_DIR}/${config_UserChoices_TagName}/${config_UserChoices_JobName} 116 set +A RebuildDir -- $( find ${REBUILD_DIR} -type d -name "*${PeriodDateBegin}*" ) 117 fi 118 CountRebuildDir=${#RebuildDir[@]} 119 fi 120 101 121 IGCM_debug_Print 1 "Number of files to be erased : ${CountListFiles}." 102 122 if [ ${CountListFiles} -gt 0 ] ; then … … 113 133 echo "OK. It will be erased." 114 134 IGCM_sys_RshArchive "find ${R_SAVE} -name \"*${PeriodDateEnd}*\" -exec rm -f '{}' \;" 135 echo "done." 136 ;; 137 non|NON|n|no|NO) 138 echo "Nothing to do !" 139 ;; 140 esac 141 fi 142 143 if [ ${CountRebuildDir} -gt 0 ] ; then 144 IGCM_debug_Print 1 "Number of REBUILD Dirs to be erased : ${CountRebuildDir}." 145 for Dir in ${RebuildDir[@]} ; do 146 IGCM_debug_Print 2 -e "\033[1;31m ${Dir}\033[m" 147 done 148 149 echo "\033[1;32mDo you REALLY want to erase all those Directories ?" 150 echo -n " Your answer (y/n) : \033[m" 151 read reponse 152 case ${reponse} in 153 154 oui|OUI|o|y|yes|YES) 155 echo "OK. It will be erased." 156 if [ X${config_Post_RebuildFromArchive} = Xtrue ] ; then 157 IGCM_sys_RshArchive "find ${REBUILD_DIR} -type d -name \"*${PeriodDateBegin}*\" -exec rm -Rf '{}' \;" 158 else 159 find ${REBUILD_DIR} -type d -name "*${PeriodDateBegin}*" -exec rm -Rf '{}' \; 160 fi 115 161 echo "done." 116 162 ;;
Note: See TracChangeset
for help on using the changeset viewer.