Changeset 6671 for modipsl/trunk/util/model
- Timestamp:
- 11/07/23 15:46:26 (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modipsl/trunk/util/model
r6269 r6671 45 45 # Retrieve the model name 46 46 #- 47 [[ ${#} -gt 1]] && \47 [[ ${#} -gt 2 ]] && \ 48 48 { echo 'Only one model can be specified' 1>&2; exit 3; } 49 49 [[ ${#} -eq 1 ]] && { m_n="${1}"; } 50 sub_conf="FULL" 51 [[ ${#} -eq 2 ]] && { m_n="${1}"; sub_conf="${2}"; } 50 52 [[ ${m_a} != 'help' && -z ${m_n} ]] && \ 51 53 { … … 54 56 exit 3; 55 57 } 58 59 case ${m_n} in 60 ( IPSLCM7* ) 61 # subconfiguration is optional 62 if [ ${sub_conf} == "LMDZOR" ] ; then 63 comp_to_exclude="NEMO OASIS INCA DYNAMICO" 64 elif [ ${sub_conf} == "LMDZORINCA" ] ; then 65 comp_to_exclude="NEMO OASIS DYNAMICO" 66 elif [ ${sub_conf} == "ICOLMDZOR" ] ; then 67 comp_to_exclude="NEMO OASIS INCA" 68 elif [ ${sub_conf} == "ICOLMDZORINCA" ] ; then 69 comp_to_exclude="NEMO OASIS" 70 elif [ ${sub_conf} == "FULL" ] ; then 71 comp_to_exculde=" " 72 else 73 echo Sub-configuration ${sub_conf} is not supported. 74 echo Choose between ICOLMDZOR, ICOLMDZORINCA, LMDZOR or LMDZORINCA 75 echo For full configuration, do not specify the second argument or choose FULL 76 exit 77 fi 78 ;; 79 ( * ) 80 # sub configuration is not possible 81 if [ ${sub_conf} != "FULL" ] ; then 82 echo Extraction of a sub-configuration is not supported for this model. Remove second argument and retry. 83 exit 84 fi 85 esac 86 56 87 #- 57 88 # Test availability of the definition file … … 102 133 unset v0 v1 v2 v3; 103 134 #- Extract the model informations 104 qi=0; 105 while read v0 v1 v2 v3 v4 v5 v6 135 qi=0; 136 while read v0 v1 v2 v3 v4 v5 v6 v7 106 137 do 107 138 [[ -n "${v1}" && "${v1}" = "${m_n}" ]] && \ 108 139 { 109 140 #- model manager email address … … 148 179 m_l[${qi}]=${v6}; 149 180 [[ -z "${m_l[${qi}]}" ]] && { m_l[${qi}]="modeles"; } 181 m_7[${qi}]=${v7}; 182 [[ -z "${m_7[${qi}]}" ]] && { m_7[${qi}]="none"; } 150 183 } 151 184 } 152 185 done <${F_DEF} 153 unset v0 v1 v2 v3 v4 v5 v6 186 unset v0 v1 v2 v3 v4 v5 v6 v7 154 187 #- Validate the model informations 155 188 #- m_m: model manager email address. If not found in mod.def then set default adress. … … 202 235 else 203 236 echo 'model : '${m_n}; 237 [[ ${sub_conf} != "FULL" ]] && echo "Subconfiguration : ${sub_conf} (following components will not be extracted: ${comp_to_exclude})" 204 238 echo ' '; 205 239 while read v0 v1 v2 … … 215 249 do 216 250 ((qi=qi+1)); 251 252 # Check if the component is in the list of compents to exclude from installation 253 # If that's the case, continue to next component 254 z7=${m_7[${qi}]} 255 if [ "X$( echo ${comp_to_exclude} | grep $z7 )" != "X" ] ; then 256 [[ ${m_v} = 'verbose' ]] && { echo Component ${z7} will not be extracted. ; } 257 continue 258 fi 217 259 echo 'Component '${qi}' : '${m_c[${qi}]}; 218 260 echo 'Revision '${qi}' : '${m_t[${qi}]}; … … 221 263 echo 'Directory '${qi}' : '${m_d[${qi}]}; 222 264 echo 'Local Dir '${qi}' : '${m_l[${qi}]}; 265 echo 'Comp name '${qi}' : '${z7}; 266 echo '' 223 267 done 224 268 fi … … 272 316 zp=${m_p[${qi}]}; zs=${m_s[${qi}]}; 273 317 zd=${m_d[${qi}]}; zl=${m_l[${qi}]}; 274 318 z7=${m_7[${qi}]}; 319 320 # Check if the component is in the list of compents to exclude from installation 321 # If that's the case, continue to next component 322 if [ "X$( echo ${comp_to_exclude} | grep $z7 )" != "X" ] ; then 323 [[ ${m_v} = 'verbose' ]] && { echo Component ${z7} will not be extracted. ; } 324 continue 325 fi 326 275 327 # Maybe change some information marked with DEFAULT. 276 328 # Check if key word DEFAULT is used in component name … … 305 357 echo '--- Directory : '${zd}; 306 358 echo '--- Local Dir : '${zl}; 359 echo '--- Component name : '${z7}; 307 360 else 308 361 echo '--- Component : '${zd}; … … 317 370 echo '--- Server : '${zs}; 318 371 echo '--- Directory : '${zd}; 319 echo '--- Local Dir : '${zl}; } >>"${F_LOG}" 372 echo '--- Local Dir : '${zl}; 373 echo '--- Component name : '${z7}; } >>"${F_LOG}" 320 374 #--- 321 375 [[ ${zp} = 'cvs' ]] && \ … … 447 501 esac 448 502 503 case ${m_n} in ( IPSLCM7* ) 504 if [ ${sub_conf} == "LMDZOR" ] ; then 505 rm -fr ../config/IPSLCM7*/EXPERIMENTS/IPSLCM* 506 rm -fr ../config/IPSLCM7*/EXPERIMENTS/ICOLMDZ* 507 rm -fr ../config/IPSLCM7*/EXPERIMENTS/*INCA* 508 elif [ ${sub_conf} == "LMDZORINCA" ] ; then 509 rm -fr ../config/IPSLCM7*/EXPERIMENTS/IPSLCM* 510 rm -fr ../config/IPSLCM7*/EXPERIMENTS/ICOLMDZ* 511 elif [ ${sub_conf} == "ICOLMDZOR" ] ; then 512 rm -fr ../config/IPSLCM7*/EXPERIMENTS/IPSLCM* 513 rm -fr ../config/IPSLCM7*/EXPERIMENTS/*INCA* 514 elif [ ${sub_conf} == "ICOLMDZORINCA" ] ; then 515 rm -fr ../config/IPSLCM7*/EXPERIMENTS/IPSLCM* 516 fi 517 ;; 518 esac 519 449 520 #--- Create Makefiles using the script ins_make 450 521 # ins_make will detect target machine among predefined targets in AA_make.gdef and
Note: See TracChangeset
for help on using the changeset viewer.