Changeset 5638


Ignore:
Timestamp:
2015-07-27T21:39:48+02:00 (5 years ago)
Author:
nicolasmartin
Message:

dev_r5092_CNRS_SETTE Finalize how to get softs release (bug && name cleaning)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5092_CNRS_SETTE/NEMOGCM/TRUST/trusting_func.sh

    r5637 r5638  
    1010   [ -e ocean.output ] && line=$( grep -m1 -A4 "$state"   ocean.output | tr -d '\n' ) 
    1111    else 
    12    [ -e ocean.output ] && line=$( grep -m1 -A3 "^ $state" ocean.output | tr -d '\n' ) 
     12   [ -e ocean.output ] && line=$( grep -m1 -A2 "^ $state" ocean.output | tr -d '\n' ) 
    1313    fi 
    1414 
     
    101101get_soft_rel() { 
    102102    for soft in $CDO $COMPILER $MPI $NETCDF; do 
     103   soft_rel='' 
    103104        ((   ${I_MODULE} == 1   )) && soft_rel=$( echo $LOADEDMODULES | sed "s/.*$soft\([0-9.a-z_]*\).*/\1/i" ) 
    104105   [    -z "${soft_rel}"    ] && soft_rel=$( echo $PATH          | sed "s/.*$soft\([0-9.a-z_]*\).*/\1/i" ) 
    105106   [ "$soft" == "$COMPILER" ] && soft_rel=$( $soft --version     | grep -m1 -oe '\<[0-9. ]*\>'           ) 
    106    ## Not working inside CURIE cron (cdo embedded in netcdf-*) 
    107 #  [[ "$soft" == "$CDO"    && -z "${soft_rel}" ]] && soft_rel=$( echo $PATH | grep -o "netcdf-utils[^/]*" ) 
    108 #  [[ "$soft" == "$NETCDF" && -z "${soft_rel}" ]] && soft_rel=$( echo $PATH | grep -o "netcdf[^/]*"  | sort -u | head -1 ) 
    109    echo $( echo $soft | tr -d '\\' ) ${soft_rel} >> model.log 
     107   # Cleaning characters string to display proper soft name 
     108   soft=$( echo $soft | sed 's#\\##; s#[/-]$##' ) 
     109   echo $soft ${soft_rel} >> model.log 
    110110    done 
    111111 
Note: See TracChangeset for help on using the changeset viewer.