Changeset 1877
- Timestamp:
- 09/13/12 14:31:21 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modipsl/trunk/util/ins_job
r1831 r1877 24 24 function ins_job_Warning 25 25 { 26 print - "\n############### WARNING ###############";27 print - "File ${n_f} already exists\nin directory ${j}";28 print - "You must delete this file to update !";26 [[ ${x_v} = 'verbose' ]] && print - "\n############### WARNING ###############"; 27 [[ ${x_v} = 'verbose' ]] && print - "File ${n_f} already exists\nin directory ${j}"; 28 [[ ${x_v} = 'verbose' ]] && print - "You must delete this file to update !"; 29 29 } 30 30 #- … … 90 90 } 91 91 #- 92 print - "\nInstallation of jobs for '${x_t}'";92 [[ ${x_v} = 'verbose' ]] && print - "\nInstallation of jobs for '${x_t}'"; 93 93 #- 94 94 # Accessing to functions (without stack) … … 122 122 continue 123 123 else 124 print - "\nWorking with file ${F_CFG}\nin directory ${j}\nfor ${n_f}";124 [[ ${x_v} = 'verbose' ]] && print - "\nWorking with file ${F_CFG}\nin directory ${j}\nfor ${n_f}"; 125 125 fi 126 126 … … 128 128 if [ -d ${j}/EXPERIMENTS ] && [ -d ${j}/GENERAL ] ; then 129 129 # New Structure 130 echo "This is new configuration structure"130 [[ ${x_v} = 'verbose' ]] && echo "This is new configuration structure" 131 131 new_struct=yes 132 132 resolfile=$j/.resol … … 163 163 JobName=${config_UserChoices_JobName} 164 164 fi 165 echo "JobName=${JobName}"165 [[ ${x_v} = 'verbose' ]] && echo "JobName=${JobName}" 166 166 167 167 # Add specific treatment for new type of directory structure … … 175 175 exit 4 176 176 else 177 echo "ExpType= ${config_UserChoices_ExpType}"177 [[ ${x_v} = 'verbose' ]] && echo "ExpType= ${config_UserChoices_ExpType}" 178 178 fi 179 179 … … 182 182 continue 183 183 fi 184 echo "=> Submit directory ${JobName} will be created with cards from EXPERIMENTS/${config_UserChoices_ExpType}" 184 185 cp -r ${j}/EXPERIMENTS/${config_UserChoices_ExpType} ${j}/${JobName} 185 186 cp -r ${j}/GENERAL/* ${j}/${JobName}/. … … 188 189 rm -f ${j}/${F_CFG}.bak 189 190 j=${j}/${JobName} 190 echo new j=$j191 [[ ${x_v} = 'verbose' ]] && echo new j=$j 191 192 fi 192 193 # end specific treatment for new type directory structure … … 194 195 [[ -f ${j}'/'${n_f} ]] && { ins_job_Warning; } || \ 195 196 { 196 print - "\nCopying file ${F_RCI}\nin directory ${j}";197 [[ ${x_v} = 'verbose' ]] && print - "\nCopying file ${F_RCI}\nin directory ${j}"; 197 198 \cp ${F_RCI} ${j}; 198 199 } … … 201 202 n_f='Job_'${JobName}; 202 203 [[ -f ${j}'/'${n_f} ]] && { ins_job_Warning; continue; } 203 print - "\nWorking with file ${F_CFG}\nin directory ${j}\nfor ${n_f}";204 [[ ${x_v} = 'verbose' ]] && print - "\nWorking with file ${F_CFG}\nin directory ${j}\nfor ${n_f}"; 204 205 sed -e "/^${W_W} */ s///" \ 205 206 -e "/^${W_P}/d" \ … … 221 222 j=${i%/*}; n_f=${i_f#AA_}'.job'; 222 223 [[ -f ${j}'/'${n_f} ]] && { ins_job_Warning; continue; } 223 print - "\nIn directory ${j}\n${i_f} -> ${n_f}"224 [[ ${x_v} = 'verbose' ]] && print - "\nIn directory ${j}\n${i_f} -> ${n_f}" 224 225 sed -e "/^${W_W} */ s///" \ 225 226 -e "s%::modipsl::%${F_MOD}%" \ … … 250 251 fi 251 252 #- 252 print - "";253 [[ ${x_v} = 'verbose' ]] && print - ""; 253 254 #- 254 255 # That's all folks
Note: See TracChangeset
for help on using the changeset viewer.