~mallorymarcot/unifield-toolbox/just_download

« back to all changes in this revision

Viewing changes to RB/Sync_Init/init_sync.sh

  • Committer: jf
  • Date: 2017-11-08 08:56:00 UTC
  • Revision ID: jfb@tempo-consulting.fr-20171108085600-k7a1vteiwwcbdj72
MKDB: sync as admin / new options s or m for -i switch to create interSection or interMission instances

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
INIT_TYPE="mkdb"
46
46
COMMENT_ACL=
47
47
FULL_TREE='"""'
 
48
INTERMISSION_TREE='"""'
 
49
INTERSECTION_TREE='"""'
48
50
JIRA=
49
51
SET_RB=
50
52
RB_PREFIX=
76
78
        ;;
77
79
    i)
78
80
        AUTO=1
79
 
        IFS="-"
80
 
        arr=($OPTARG)
81
 
        unset IFS
82
 
        num_hq=${arr[0]-1}
83
 
        num_coordo=${arr[1]-1}
84
 
        num_project=${arr[2]-1}
 
81
        if [[ "$OPTARG" == "s" ]]; then
 
82
            INTERSECTION_TREE=""
 
83
        elif [[ "$OPTARG" == "m" ]]; then
 
84
            INTERMISSION_TREE=""
 
85
        else
 
86
            IFS="-"
 
87
            arr=($OPTARG)
 
88
            unset IFS
 
89
            num_hq=${arr[0]-1}
 
90
            num_coordo=${arr[1]-1}
 
91
            num_project=${arr[2]-1}
 
92
        fi
85
93
        ;;
86
94
    v)
87
95
        BUILD_PYTHON_ENV=1
140
148
 
141
149
          # MKDB options
142
150
          -c: currency eur/chf
143
 
          -i: #instances ex: 1-2-2 for 1 hq, 2 coordos, 2 projects (default: 1-1-1)
 
151
          -i: #instances ex: 1-2-2 for 1 hq, 2 coordos, 2 projects (default: 1-1-1) / s for HQ1C1{1,2}P1 + HQ1C1 / m for HQ1C{1,2}P1
144
152
          -f: full tree instances: HQ1C1(P1/P2) H1C2P1 H1C1
145
153
          -L: do not load fr lang
146
154
          -m: mkdb branch
306
314
    -e "s#@@PROTO@@#${PROTO}#g" \
307
315
    -e "s#@@PG_PATH@@#${PG_PATH:=}#g" \
308
316
    -e "s#@@DBPATH@@#${PG_PATH:=/usr/lib/postgresql/8.4/bin/}#g" \
 
317
    -e "s#@@INTERMISSION_TREE@@#${INTERMISSION_TREE}#g" \
 
318
    -e "s#@@INTERSECTION_TREE@@#${INTERSECTION_TREE}#g" \
309
319
    -e "s#@@WEBPORT@@#${WEBPORT}#g" $1  > $2
310
320
}
311
321