source: vendors/update_EXTERNAL_agrif.sh @ 1984

Last change on this file since 1984 was 1984, checked in by flavoni, 11 years ago

commit scripts for EXTERNAL update, see ticket #685

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1#!/bin/bash
2
3set -x
4
5last_version=$1
6new_version=$2
7new_version_name=$3
8name=$4
9 
10#- My projet url
11svn_repo_url=svn+ssh://$name@forge.ipsl.jussieu.fr/ipsl/forge/projets/mentor/svn/
12
13#- EXTERNAL directory in which we want to merge vendors
14svn_external=svn+ssh://$name@forge.ipsl.jussieu.fr/ipsl/forge/projets/mentor/svn/trunk/NEMOGCM/EXTERNAL
15
16#- Vendor branch
17vendor_branch=AGRIF
18
19#- Vendor project url
20vendor_url=http://forge.ipsl.jussieu.fr/nemo/svn/trunk
21
22merge=1
23 
24if [ $# -ne 4 ]; then
25    echo "Usage: $0 old_version_on_vendor new_version_on_remote new_version_name_on_vendor user"
26    echo " *_on_vendor is the tag on the local vendor branch "
27    echo " *_on_remote is the reference on remote model (revision number only):  REVNUMBER"
28    exit 1
29fi
30 
31[ ! -d tmp_update_nemo ] && mkdir tmp_update_${vendor_branch}
32tmp_dir=tmp_update_${vendor_branch}
33cd $tmp_dir
34
35svn export -r $new_version $vendor_url/AGRIF  r_$new_version
36
37/sw/share/svn/contrib/client-side/svn_load_dirs/svn_load_dirs.pl $svn_repo_url/vendors/$vendor_branch -t r_$new_version_name current r_$new_version
38
39echo "Downloading and extracting AGRIF version $new_version..." 
40svn co $svn_external/AGRIF
41
42if [ $merge == '1' ]; then
43    svn merge "$svn_repo_url/vendors/$vendor_branch/$last_version" "$svn_repo_url/vendors/$vendor_branch/current" AGRIF
44fi
45 
46## NOTE : after a merge we have conflicts
47## to resole them it is necessary to do, for example : svn resolved AGRIF/directory with conflits
48
49## NOTE : if you have a good merge then you have to committ:
50## cd $tmp_dir/$vendor_branch
51## svn status ../AGRIF/
52## svn ci --username $name --message "merge AGRIF version $new_version_name"
53 
54exit 0
551
Note: See TracBrowser for help on using the repository browser.