Changeset 1597


Ignore:
Timestamp:
11/25/11 17:00:57 (12 years ago)
Author:
mmaipsl
Message:

Protect svn options for server definition.

Location:
modipsl/trunk/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modipsl/trunk/util/script_log_analyse

    r1583 r1597  
    8181printDebugArray ModelSystems 
    8282 
    83 set -A ModelServers -- $( cat ${LastModelFile} | grep '\-\-\-\ Server *: ' | sed -e 's&--- Server *: \(.*\)&\1&' ) 
     83set -A ModelServers -- $( cat ${LastModelFile} | grep '\-\-\-\ Server *: ' | sed -e 's&--- Server *: \(.*\)&\1&' | sed -e 's& &:_:&g' ) 
    8484printDebugArray ModelServers 
    8585 
  • modipsl/trunk/util/script_recup_model

    r1586 r1597  
    8484            ;; 
    8585        6) 
    86             set +A ModelServers -- $line 
     86            (( j = 0 )) 
     87            set +A ModelServersProtect -- $line 
     88            for comp in ${ModelComponents[@]}; do 
     89                ModelServers[$j]=$( echo ${ModelServersProtect[$j]} | sed -e 's&:_:& &g' )  
     90                (( j = j + 1 )) 
     91            done 
    8792            printDebugArray ModelServers 
    8893            ;; 
     
    143148    echo $i $comp " : " $tag 
    144149 
    145     pathComp=${ListPathComp[$i]} 
    146     filecomp=$( echo ${ListPathFile[$i]} | sed -e "s/_empty_//" ) 
    147     SpathComp=${MODIPSL_SAVE}/${pathComp} 
    148     echo "Path/file :" ${pathComp}/${filecomp} 
    149  
    150     case ${ModelSystems[$i]} in 
    151         svn) 
    152             svn co -r ${ListPathRev[$i]} ${ModelServers[$i]}/${ListPathBranch[$i]}/${filecomp} ${pathComp}/${filecomp} 
    153             ;; 
    154         cvs) 
    155  
    156             cd ${ModelLocalDirs[i]} 
    157             if [ X${ModelDirectories[$i]} = X. ] ; then 
     150    if [ X${ListPathComp[$i]} != Xerror ] ; then 
     151        pathComp=${ListPathComp[$i]} 
     152        filecomp=$( echo ${ListPathFile[$i]} | sed -e "s/_empty_//" ) 
     153        SpathComp=${MODIPSL_SAVE}/${pathComp} 
     154        echo "Path/file :" ${pathComp}/${filecomp} 
     155 
     156        case ${ModelSystems[$i]} in 
     157            svn) 
     158                svn co -r ${ListPathRev[$i]} ${ModelServers[$i]}/${ListPathBranch[$i]}/${filecomp} ${pathComp}/${filecomp} 
     159                ;; 
     160            cvs) 
     161                 
     162                cd ${ModelLocalDirs[i]} 
     163                if [ X${ModelDirectories[$i]} = X. ] ; then 
    158164#               rev=$( echo ${ListPathRev[$i]} | sed -e 's%\([0-9][0-9]\)/\([0-9][0-9]\)/\([0-9][0-9]\)_\([0-9][0-9]:[0-9][0-9]:[0-9][0-9]\)%\3/\1/\2 \4%g' ) 
    159                 rev=$( echo ${ListPathRev[$i]} | sed -e 's%:"[0-9][0-9]/[0-9][0-9]/[0-9][0-9]_[0-9][0-9]:[0-9][0-9]:[0-9][0-9]"%%g' ) 
    160                 eval cvs -d :pserver:${ModelServers[$i]} co -r "${rev}" ${comp} 
    161             else 
    162                 rev=$( echo ${ListPathRev[$i]} | sed -e 's%:"[0-9][0-9]/[0-9][0-9]/[0-9][0-9]_[0-9][0-9]:[0-9][0-9]:[0-9][0-9]"%%g' ) 
    163                 echo cvs -d :pserver:${ModelServers[$i]} co -r ${rev} -d ${ModelDirectories[$i]} ${comp} 
    164                 cvs -d :pserver:${ModelServers[$i]} co -r ${rev} -d ${ModelDirectories[$i]} ${comp} 
    165             fi 
    166             cd ${MODIPSL} 
    167  
    168             ;; 
    169         *) 
    170             echo "error ${ModelSystems[$i]} is not recognized as a valid control version system for ${MODIPSL_SAVE}/Last_log." 
    171             exit 1 
    172             ;; 
    173     esac 
     165                    rev=$( echo ${ListPathRev[$i]} | sed -e 's%:"[0-9][0-9]/[0-9][0-9]/[0-9][0-9]_[0-9][0-9]:[0-9][0-9]:[0-9][0-9]"%%g' ) 
     166                    eval cvs -d :pserver:${ModelServers[$i]} co -r "${rev}" ${comp} 
     167                else 
     168                    rev=$( echo ${ListPathRev[$i]} | sed -e 's%:"[0-9][0-9]/[0-9][0-9]/[0-9][0-9]_[0-9][0-9]:[0-9][0-9]:[0-9][0-9]"%%g' ) 
     169                    echo cvs -d :pserver:${ModelServers[$i]} co -r ${rev} -d ${ModelDirectories[$i]} ${comp} 
     170                    cvs -d :pserver:${ModelServers[$i]} co -r ${rev} -d ${ModelDirectories[$i]} ${comp} 
     171                fi 
     172                cd ${MODIPSL} 
     173                 
     174                ;; 
     175            *) 
     176                echo "error ${ModelSystems[$i]} is not recognized as a valid control version system for ${MODIPSL_SAVE}/Last_log." 
     177                exit 1 
     178                ;; 
     179        esac 
     180    fi 
    174181    ((i=i+1)) 
    175182done 
     
    182189(( i = 0 )) 
    183190for comp in ${ModelComponents[@]}; do 
    184     tag=${ModelTags[$i]} 
    185     echo $i $comp " : " $tag 
    186  
    187     pathComp=${ListPathComp[$i]} 
    188     filecomp=$( echo ${ListPathFile[$i]} | sed -e "s/_empty_//" ) 
    189     SpathComp=${MODIPSL_SAVE}/${pathComp} 
    190     echo "Patch :" $( ls ${SpathComp} ) 
    191  
    192     # Patch this model 
    193     cd ${pathComp} 
    194     case ${ModelSystems[$i]} in 
    195         svn) 
    196             patch -p0 -i ${SpathComp}/svn_diff       
    197             ;; 
    198         cvs) 
    199             patch -p0 -i ${SpathComp}/cvs_diff 
    200             ;; 
    201     esac 
    202     cd ${MODIPSL} 
     191 
     192    if [ X${ListPathComp[$i]} != Xerror ] ; then 
     193        tag=${ModelTags[$i]} 
     194        echo $i $comp " : " $tag 
     195 
     196        pathComp=${ListPathComp[$i]} 
     197        filecomp=$( echo ${ListPathFile[$i]} | sed -e "s/_empty_//" ) 
     198        SpathComp=${MODIPSL_SAVE}/${pathComp} 
     199        echo "Patch :" $( ls ${SpathComp} ) 
     200 
     201        # Patch this model 
     202        cd ${pathComp} 
     203        case ${ModelSystems[$i]} in 
     204            svn) 
     205                patch -p0 -i ${SpathComp}/svn_diff           
     206                ;; 
     207            cvs) 
     208                patch -p0 -i ${SpathComp}/cvs_diff 
     209                ;; 
     210        esac 
     211        cd ${MODIPSL} 
     212    fi 
    203213    ((i=i+1)) 
    204214done 
Note: See TracChangeset for help on using the changeset viewer.