]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blob - scripts/install_code.bat
PASDK-258:Update PDK eng to 1.0.1.1. Using build number to differentiate PDK eng...
[processor-sdk/performance-audio-sr.git] / scripts / install_code.bat
1 @echo off
2 :: *************************************************************************
3 ::  FILE           : install_code.bat
4 ::  DESCRIPTION    :
5 ::
6 ::     Gets code from GIT repositories.
7 ::     Assumes setup_env.bat has been called.
8 ::
9 :: *************************************************************************
11 :: %1:
12 ::  buildTag         : Use Git tag to track submodules for build targets
13 ::  -OR-
14 ::  SuperRepo        : Use Git super-repository to track submodules for build targets
15 @echo Executing:  %~fn0 %1
17 set SAVE_PATH=%PATH%
18 set PATH=C:\Tools;%PATH%
20 set HOME=%USERPROFILE%
22 :: Atmos component repositories
23 set BMDA_GIT_REPO=git@gitorious.design.ti.com:dolby-harmonious/bmda.git
24 set CAR_GIT_REPO=git@gitorious.design.ti.com:dolby-harmony-da10x/car.git
25 set DDP_GIT_REPO=git@gitorious.design.ti.com:dolby-harmonious/ddp.git
26 set INTR_GIT_REPO=git@gitorious.design.ti.com:dolby-harmonious/intrinsics.git
27 set MATTHD_GIT_REPO=git@gitorious.design.ti.com:dolby-harmonious/mat-thd.git
28 set OAR_GIT_REPO=git@gitorious.design.ti.com:dolby-harmonious/oar.git
30 :: PAF repository
31 set PAF_GIT_REPO=git@gitorious.design.ti.com:dolby-harmonious/os_paf_dev.git
33 :: Web proxy
34 set http_proxy=http://webproxy.ext.ti.com:80
37 :: Check if any repository folders are empty
38 if EXIST dolby_ip\bmda\nul if NOT EXIST dolby_ip\bmda\.git ( rmdir /S /Q dolby_ip\bmda )
39 if EXIST dolby_ip\car\nul if NOT EXIST dolby_ip\car\.git ( rmdir /S /Q dolby_ip\car )
40 if EXIST dolby_ip\ddp\nul if NOT EXIST dolby_ip\ddp\.git ( rmdir /S /Q dolby_ip\ddp )
41 if EXIST dolby_ip\intrinsics\nul if NOT EXIST dolby_ip\intrinsics\.git ( rmdir /S /Q dolby_ip\intrinsics )
42 if EXIST dolby_ip\mat-thd\nul if NOT EXIST dolby_ip\mat-thd\.git ( rmdir /S /Q dolby_ip\mat-thd )
43 if EXIST dolby_ip\oar\nul if NOT EXIST dolby_ip\oar\.git ( rmdir /S /Q dolby_ip\oar )
46 :: Determine install type
47 if "%1" NEQ "SuperRepo" goto gittaginstall
49 :superrepoinstall
50 :: Use super-repository for sub-module code installation
51 @echo SuperRepo install
52 call git submodule update --init
53 goto install_end
56 :gittaginstall
57 @echo BuildTag install
58 :: Use Git tag for sub-module code installation
59 :: *************************************************************************
60 :: ** Install BMDA
61 :: *************************************************************************
62 if exist dolby_ip\bmda\nul goto bmda_update
63 @echo Clone:  BMDA
64 call git clone %BMDA_GIT_REPO% dolby_ip\bmda
65 if not exist dolby_ip\bmda goto bmda_error
66 goto bmda_checkout
67 :bmda_update
68 @echo Fetch:  BMDA
69 pushd dolby_ip\bmda
70 call git fetch --tags origin
71 popd
73 :bmda_checkout
74 pushd dolby_ip\bmda
75 call git checkout %1
76 popd
78 :: *************************************************************************
79 :: ** Install CAR
80 :: *************************************************************************
81 if exist dolby_ip\car\nul goto car_update
82 @echo Clone:  CAR
83 call git clone %CAR_GIT_REPO% dolby_ip\car
84 if not exist dolby_ip\car goto car_error
85 goto car_checkout
86 :car_update
87 @echo Fetch:  CAR
88 pushd dolby_ip\car
89 call git fetch --tags origin
90 popd
92 :car_checkout
93 pushd dolby_ip\car
94 call git checkout %1
95 popd
97 :: *************************************************************************
98 :: ** Install DDP
99 :: *************************************************************************
100 if exist dolby_ip\ddp\nul goto ddp_update
101 @echo Clone:  DDP
102 call git clone %DDP_GIT_REPO% dolby_ip\ddp
103 if not exist dolby_ip\ddp goto ddp_error
104 goto ddp_checkout
105 :ddp_update
106 @echo Fetch:  DDP
107 pushd dolby_ip\ddp
108 call git fetch --tags origin
109 popd
111 :ddp_checkout
112 pushd dolby_ip\ddp
113 call git checkout %1
114 popd
116 :: *************************************************************************
117 :: ** Install Intrinsics
118 :: *************************************************************************
119 if exist dolby_ip\intrinsics\nul goto intr_update
120 @echo Clone:  Intrinsics
121 call git clone %INTR_GIT_REPO% dolby_ip\intrinsics
122 if not exist dolby_ip\intrinsics goto intr_error
123 goto intr_checkout
124 :intr_update
125 @echo Fetch:  Intrinsics
126 pushd dolby_ip\intrinsics
127 call git fetch --tags origin
128 popd
130 :intr_checkout
131 pushd dolby_ip\intrinsics
132 call git checkout %1
133 popd
135 :: *************************************************************************
136 :: ** Install MAT-THD
137 :: *************************************************************************
138 if exist dolby_ip\mat-thd\nul goto matthd_update
139 @echo Clone:  mat-thd
140 call git clone %MATTHD_GIT_REPO% dolby_ip\mat-thd
141 if not exist dolby_ip\mat-thd goto matthd_error
142 goto matthd_checkout
143 :matthd_update
144 @echo Fetch:  mat-thd
145 pushd dolby_ip\mat-thd
146 call git fetch --tags origin
147 popd
149 :matthd_checkout
150 pushd dolby_ip\mat-thd
151 call git checkout %1
152 popd
154 :: *************************************************************************
155 :: ** Install OAR
156 :: *************************************************************************
157 if exist dolby_ip\oar\nul goto oar_update
158 @echo Clone:  OAR
159 call git clone %OAR_GIT_REPO% dolby_ip\oar
160 if not exist dolby_ip\oar goto oar_error
161 goto oar_checkout
162 :oar_update
163 @echo Fetch:  OAR
164 pushd dolby_ip\oar
165 call git fetch --tags origin
166 popd
168 :oar_checkout
169 pushd dolby_ip\oar
170 call git checkout %1
171 popd
173 :: *************************************************************************
174 :: ** Install PAF
175 :: *************************************************************************
176 if exist pasdk\paf\nul goto paf_update
177 @echo Clone:  PAF
178 call git clone %PAF_GIT_REPO% pasdk\paf
179 if not exist pasdk\paf goto paf_error
180 goto paf_checkout
181 :paf_update
182 @echo Fetch:  PAF
183 pushd pasdk\paf
184 call git fetch --tags origin
185 popd
187 :paf_checkout
188 pushd pasdk\paf
189 call git checkout %1
190 popd
192 :: *************************************************************************
193 :: ** Report errors
194 :: *************************************************************************
195 goto install_end
197 :bmda_error
198 @echo Unable to clone BMDA GIT repository:  %BMDA_GIT_REPO%  exiting...
199 goto install_end
201 :car_error
202 @echo Unable to clone CAR GIT repository:  %CAR_GIT_REPO%  exiting...
203 goto install_end
205 :ddp_error
206 @echo Unable to clone DDP GIT repository:  %DDP_GIT_REPO%  exiting...
207 goto install_end
209 :intr_error
210 @echo Unable to clone Intrinsics GIT repository:  %INTR_GIT_REPO%  exiting...
211 goto install_end
213 :matthd_error
214 @echo Unable to clone MAT-THD GIT repository:  %MATTHD_GIT_REPO%  exiting...
215 goto install_end
217 :oar_error
218 @echo Unable to clone OAR GIT repository:  %OAR_GIT_REPO%  exiting...
219 goto install_end
221 :paf_error
222 @echo Unable to clone PAF GIT repository:  %PAF_GIT_REPO%  exiting...
223 goto install_end
225 :: *************************************************************************
226 :: *** Cleanup and return
227 :: *************************************************************************
228 :install_end
229 set PATH=%SAVE_PATH%
230 set SAVE_PATH=
232 set HOME=
233 set BMDA_GIT_REPO=
234 set CAR_GIT_REPO=
235 set DDP_GIT_REPO=
236 set INTR_GIT_REPO=
237 set MATTHD_GIT_REPO=
238 set OAR_GIT_REPO=
239 set PAF_GIT_REPO=
240 set http_proxy=
242 :end
243 :: *************************************************************************
244 :: *** Nothing past this point
245 :: *************************************************************************