Changeset 2234


Ignore:
Timestamp:
04/07/14 17:56:53 (11 years ago)
Author:
jgipsl
Message:

Adapted script for special case IPSLCM6 without suffix _v6.

Location:
CONFIG/UNIFORM/v6
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CONFIG/UNIFORM/v6/diff_configurations.ksh

    r2210 r2234  
    1616ConfigFamily=v6 
    1717ConfigList=`ls |grep ${ConfigFamily} |grep -v out` 
     18ConfigList=$ConfigList" IPSLCM6"  
    1819verbose=no 
    1920echo All configurations to tests : $ConfigList 
  • CONFIG/UNIFORM/v6/propagate_master_config.ksh

    r2049 r2234  
    2121verbose=yes 
    2222BaseDir=`pwd` 
    23 ConfigFamily=$( echo $MasterConfig | awk -F"_" '{print $2}' ) 
    24 ConfigList=`ls |grep ${ConfigFamily} |grep -v out |grep -v $MasterConfig` 
    25  
    26 echo  All modifications in configuration $MasterConfig will copied to the other configurations $ConfigList 
     23ConfigFamily=v6 
     24ConfigList=`ls |grep ${ConfigFamily} |grep -v out` 
     25ConfigList=$ConfigList" IPSLCM6"  
     26echo  All modifications in configuration $MasterConfig will copied to the other configurations $ConfigList . 
    2727 
    2828cd $BaseDir/$MasterConfig 
     
    3535 
    3636for conf in $ConfigList ; do 
    37     for file in $FileList ; do 
    38         if [ -f ${conf}/${file} ] ; then  
    39             cmp -s ${MasterConfig}/${file}  ${conf}/${file} 
    40             if [ $? -ne 0 ] ; then 
    41             # Files are differents 
    42                 echo "cp ${MasterConfig}/${file} ${conf}/${file}" >> $cpfile 
    43                 if [ $verbose == yes ] ; then 
    44                     diff  --brief ${MasterConfig}/${file}  ${conf}/${file} 
    45                     diff  ${MasterConfig}/${file}  ${conf}/${file} 
    46                 fi           
     37    # Only contiue if the config is not the MasterConfig 
     38    if [ $conf != $MasterConfig ] ; then 
     39        echo Do for conf= $conf and MasterConfig=$MasterConfig 
     40        for file in $FileList ; do 
     41            if [ -f ${conf}/${file} ] ; then  
     42                cmp -s ${MasterConfig}/${file}  ${conf}/${file} 
     43                if [ $? -ne 0 ] ; then 
     44                    # Files are differents 
     45                    echo "cp ${MasterConfig}/${file} ${conf}/${file}" >> $cpfile 
     46                    if [ $verbose == yes ] ; then 
     47                        diff  --brief ${MasterConfig}/${file}  ${conf}/${file} 
     48                        diff  ${MasterConfig}/${file}  ${conf}/${file} 
     49                    fi       
     50                fi 
    4751            fi 
    48         fi 
    49     done 
    50 echo "" >> $cpfile 
     52        done 
     53        echo "" >> $cpfile 
     54    fi 
    5155done 
    5256 
Note: See TracChangeset for help on using the changeset viewer.