source: utils/dev/install_dev_env.sh @ 10655

Last change on this file since 10655 was 10655, checked in by nicolasmartin, 21 months ago

Updating of dev. guide + review of install_dev_env.sh to be a bit more specific in its checkout

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/bash
2
3## Create minimal developement environment for NEMO
4###################################################
5
6## Optional arguments
7## - $1: developer ID
8## - $2: 'repo' to replicate the layout of whole repository
9
10dir='NEMO_dev'
11
12if [ "$2" == 'repo' ]; then root='/'; else root='/NEMO'; fi
13
14## Copy of the repository with empty root directories
15echo 'Checkout the repository from' $root
16svn co --depth empty http://forge.ipsl.jussieu.fr/nemo/svn/$root $dir
17echo
18
19## Switch to developer role if ID is provided
20if [ -n "$1" ]; then
21    echo 'Switch from user to developer role (http:// => svn+ssh://)'
22    ssh-copy-id -i ~/.ssh/id_rsa.pub $1@forge.ipsl.jussieu.fr 2> /dev/null
23    svn sw --relocate    http://forge.ipsl.jussieu.fr                       \
24                 svn+ssh://$1@forge.ipsl.jussieu.fr/ipsl/forge/projets \
25   NEMO_dev
26    echo
27fi
28
29if [ "$2" == 'repo' ]; then
30    echo "With 'repo' arg, create a lightweight copy of the repository"
31    echo "for the developement of the sources used as 'externals'"
32
33    for item in utils/build/{arch,makenemo,mk} utils/tools       \
34      vendors/{AGRIF/dev,AGRIF/release-4.0,FCM,IOIPSL}  ; do
35#     vendors/{AGRIF/dev,AGRIF/stable,FCM,IOIPSL}  ; do
36   echo '¤' $item
37   svn up -q --parents $dir/$item
38    done
39   
40    dir=$dir/'NEMO'
41    echo
42fi
43
44## Get the 1st level tree under 'branches' and 'releases'
45echo "Get empty development folders under '/NEMO/branches':" {UKMO,2018,2019}
46svn up -q --set-depth empty --parents $dir/branches/{UKMO,2018,2019}
47echo
48
49## Download trunk and last release
50echo 'Full download of 2 main branches'
51echo "¤ '/NEMO/trunk'"
52svn up -q           $dir/trunk
53
54echo "¤ latest in '/NEMO/releases'"
55svn up -q --parents $dir/releases/release-4.0
56
57exit 0
Note: See TracBrowser for help on using the repository browser.