Changeset 1597 for modipsl/trunk/util/script_recup_model
- Timestamp:
- 11/25/11 17:00:57 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modipsl/trunk/util/script_recup_model
r1586 r1597 84 84 ;; 85 85 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 87 92 printDebugArray ModelServers 88 93 ;; … … 143 148 echo $i $comp " : " $tag 144 149 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 158 164 # 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 174 181 ((i=i+1)) 175 182 done … … 182 189 (( i = 0 )) 183 190 for 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 203 213 ((i=i+1)) 204 214 done
Note: See TracChangeset
for help on using the changeset viewer.