Changeset 1877


Ignore:
Timestamp:
09/13/12 14:31:21 (12 years ago)
Author:
jgipsl
Message:

Removed printing in default mode. Use './ins_job -v' for verbose mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modipsl/trunk/util/ins_job

    r1831 r1877  
    2424function ins_job_Warning 
    2525{ 
    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 !"; 
    2929} 
    3030#- 
     
    9090 } 
    9191#- 
    92 print - "\nInstallation of jobs for '${x_t}'"; 
     92[[ ${x_v} = 'verbose' ]] && print - "\nInstallation of jobs for '${x_t}'"; 
    9393#- 
    9494# Accessing to functions (without stack) 
     
    122122     continue 
    123123 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}"; 
    125125 fi 
    126126 
     
    128128 if [ -d ${j}/EXPERIMENTS ] && [ -d ${j}/GENERAL ] ; then 
    129129     # New Structure 
    130      echo "This is new configuration structure" 
     130     [[ ${x_v} = 'verbose' ]] && echo "This is new configuration structure" 
    131131     new_struct=yes 
    132132     resolfile=$j/.resol 
     
    163163     JobName=${config_UserChoices_JobName} 
    164164 fi 
    165  echo "JobName=${JobName}" 
     165 [[ ${x_v} = 'verbose' ]] && echo "JobName=${JobName}" 
    166166 
    167167# Add specific treatment for new type of directory structure  
     
    175175        exit 4 
    176176      else 
    177         echo "ExpType= ${config_UserChoices_ExpType}" 
     177        [[ ${x_v} = 'verbose' ]] && echo "ExpType= ${config_UserChoices_ExpType}" 
    178178      fi 
    179179 
     
    182182          continue 
    183183      fi 
     184      echo "=> Submit directory ${JobName} will be created with cards from EXPERIMENTS/${config_UserChoices_ExpType}" 
    184185      cp -r ${j}/EXPERIMENTS/${config_UserChoices_ExpType} ${j}/${JobName} 
    185186      cp -r ${j}/GENERAL/* ${j}/${JobName}/. 
     
    188189      rm -f ${j}/${F_CFG}.bak 
    189190      j=${j}/${JobName} 
    190       echo new j=$j 
     191      [[ ${x_v} = 'verbose' ]] && echo new j=$j 
    191192  fi 
    192193# end specific treatment for new type directory structure  
     
    194195 [[ -f ${j}'/'${n_f} ]] && { ins_job_Warning; } || \ 
    195196  { 
    196    print - "\nCopying file ${F_RCI}\nin directory ${j}"; 
     197   [[ ${x_v} = 'verbose' ]] && print - "\nCopying file ${F_RCI}\nin directory ${j}"; 
    197198   \cp ${F_RCI} ${j}; 
    198199  } 
     
    201202 n_f='Job_'${JobName}; 
    202203 [[ -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}"; 
    204205 sed -e "/^${W_W} */ s///" \ 
    205206     -e "/^${W_P}/d"       \ 
     
    221222 j=${i%/*}; n_f=${i_f#AA_}'.job'; 
    222223 [[ -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}" 
    224225 sed -e "/^${W_W} */ s///" \ 
    225226     -e "s%::modipsl::%${F_MOD}%" \ 
     
    250251fi 
    251252#- 
    252 print - ""; 
     253[[ ${x_v} = 'verbose' ]] && print - ""; 
    253254#- 
    254255# That's all folks 
Note: See TracChangeset for help on using the changeset viewer.