Changeset 1828 for modipsl/trunk/util/model
- Timestamp:
- 07/20/12 11:01:47 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modipsl/trunk/util/model
r1616 r1828 16 16 #- 17 17 m_n=""; m_a="checkout"; m_v='silencious'; no_tag='false'; 18 while getopts :hevH V 18 # Option -d to take default set up without asking 19 changeok='yes' 20 while getopts :hevdH V 19 21 do 20 22 case $V in … … 22 24 (e) m_a='checkout';; 23 25 (v) m_v='verbose';; 26 (d) changeok='no';; 24 27 (H) no_tag='true';; 25 28 (:) echo ${b_n}" : option $OPTARG : missing value" 1>&2; … … 178 181 echo ' '; 179 182 if [ -z "${m_n}" ]; then 180 echo ${b_n} ' extracts the components of a model';183 echo ${b_n} ': This script is used to extract one configuration'; 181 184 echo ' '; 182 185 echo 'Usage :'; 183 echo ${b_n} '[-h]'; 184 echo ${b_n} '[-h] model_name'; 185 echo ${b_n} '[-e] [-H] [-v] model_name'; 186 echo 'h : this help'; 187 echo 'h model-name : help on model'; 188 echo 'e : extract model'; 189 echo 'H : suppress the tags and take the HEAD version'; 190 echo 'v : verbose mode'; 191 echo 'Defaults : -e'; 186 echo './'${b_n} '[-h]'; 187 echo './'${b_n} '[-h] ConfName'; 188 echo './'${b_n} '[-v] ConfName'; 189 echo '' 190 echo 'Arguments :' 191 echo 'ConfName : name of configuration to be extracted'; 192 echo '-h : this help'; 193 echo '-h ConfName : description of configuration ConfName'; 194 # Meaningless option echo '-e : extract model'; 195 # Does not work echo 'H : suppress the tags and take the HEAD version'; 196 echo '-v : verbose mode'; 197 # echo 'd : extract default components without option to change'; 192 198 echo ' '; 193 echo ' model_name in:';199 echo 'Possible configurations are :'; 194 200 qi=0; while (( ${qi} < ${#m_x[@]} )); 195 201 do ((qi=qi+1)); echo ${m_x[${qi}]}; done … … 266 272 zp=${m_p[${qi}]}; zs=${m_s[${qi}]}; 267 273 zd=${m_d[${qi}]}; zl=${m_l[${qi}]}; 274 275 # Maybe change some information marked with DEFAULT. 276 # Check if key word DEFAULT is used in component name 277 defcomp=$(echo ${zc} | awk -FDEFAULT: '{print $2}') 278 if [ X$defcomp != X ] ; then 279 if [ $changeok == 'yes' ] ; then 280 echo "=> Default component $defcomp can be changed." 281 echo " Do you want to change this path ? Type new path or return for the above default." 282 read newcomp 283 echo " Type revision number for chosen component version or return for $zt default value" 284 read newrev 285 if [ X$newcomp == X ] ; then 286 zc=$defcomp 287 else 288 zc=$newcomp 289 fi 290 291 if [ X$newrev != X ] ; then 292 zt=$newrev 293 fi 294 else 295 # changeok=no : Take default value# 296 zc=$defcomp 297 fi 298 fi 268 299 [[ ${m_v} = 'verbose' ]] && \ 269 300 { echo '---'; … … 394 425 ( IPSLCM5B ) 395 426 ../modeles/UTIL/fait_config IPSLCM5B ;; 396 ( IPSLCM5_v4 ) 397 ../modeles/UTIL/fait_config IPSLCM5_v4 ;; 427 ( IPSLCM5_v5 ) 428 ../modeles/UTIL/fait_config IPSLCM5_v5 ;; 429 ( IPSLCM5CHS_v5 ) 430 ../modeles/UTIL/fait_config IPSLCM5CHS_v5 ;; 431 ( IPSLCM5CHT_v5 ) 432 ../modeles/UTIL/fait_config IPSLCM5CHT_v5 ;; 398 433 (IPSLCM5* ) 399 434 ../modeles/UTIL/fait_config IPSLCM5 ;; … … 401 436 ../modeles/UTIL/fait_config IPSL_ESM_v2 ;; 402 437 esac 438 439 #--- Create Makefiles using the script ins_make 440 # ins_make will detect target machine among predefined targets in AA_make.gdef and 441 # create Makefiles to the corresponding target. 442 # ins_make can be re-run afterwards using another target or after editing the 443 # AA_make.gdef. ins_make will then overwrite Makefiles already created. 444 # 445 ./ins_make 446 403 447 #--- 404 448 #- That's all folks
Note: See TracChangeset
for help on using the changeset viewer.