]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blob - scripts/install_code.bat
Changed product name and root path environment variable name.
[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=ssh://git@bitbucket.itg.ti.com/pasdk-dolbyip/bmda.git
24 set CAR_GIT_REPO=ssh://git@bitbucket.itg.ti.com/pasdk-dolbyip/car.git
25 set DDP_GIT_REPO=ssh://git@bitbucket.itg.ti.com/pasdk-dolbyip/ddp.git
26 set INTR_GIT_REPO=ssh://git@bitbucket.itg.ti.com/pasdk-dolbyip/intrinsics.git
27 set MATTHD_GIT_REPO=ssh://git@bitbucket.itg.ti.com/pasdk-dolbyip/mat-thd.git
28 set OAR_GIT_REPO=ssh://git@bitbucket.itg.ti.com/pasdk-dolbyip/oar.git
30 :: DTS component repository
31 set DTS_GIT_REPO=ssh://git@bitbucket.itg.ti.com/pasdk/3p-ip-dts.git
33 :: PAF repository
34 set PAF_GIT_REPO=ssh://git@bitbucket.itg.ti.com/pasdk/os_paf_dev.git
36 :: Tools repository
37 set TOOLS_GIT_REPO=ssh://git@bitbucket.itg.ti.com/pasdk/tools.git
39 :: Web proxy
40 set http_proxy=http://webproxy.ext.ti.com:80
43 :: Check if any repository folders are empty
44 if EXIST dolby_ip\bmda\nul if NOT EXIST dolby_ip\bmda\.git ( rmdir /S /Q dolby_ip\bmda )
45 if EXIST dolby_ip\car\nul if NOT EXIST dolby_ip\car\.git ( rmdir /S /Q dolby_ip\car )
46 if EXIST dolby_ip\ddp\nul if NOT EXIST dolby_ip\ddp\.git ( rmdir /S /Q dolby_ip\ddp )
47 if EXIST dolby_ip\intrinsics\nul if NOT EXIST dolby_ip\intrinsics\.git ( rmdir /S /Q dolby_ip\intrinsics )
48 if EXIST dolby_ip\mat-thd\nul if NOT EXIST dolby_ip\mat-thd\.git ( rmdir /S /Q dolby_ip\mat-thd )
49 if EXIST dolby_ip\oar\nul if NOT EXIST dolby_ip\oar\.git ( rmdir /S /Q dolby_ip\oar )
52 :: Determine install type
53 if "%1" NEQ "SuperRepo" goto gittaginstall
55 :superrepoinstall
56 :: Use super-repository for sub-module code installation
57 @echo SuperRepo install
58 call git submodule update --init
59 goto install_end
62 :gittaginstall
63 @echo BuildTag install
64 :: Use Git tag for sub-module code installation
65 :: *************************************************************************
66 :: ** Install BMDA
67 :: *************************************************************************
68 if exist dolby_ip\bmda\nul goto bmda_update
69 @echo Clone:  BMDA
70 call git clone %BMDA_GIT_REPO% dolby_ip\bmda
71 if not exist dolby_ip\bmda goto bmda_error
72 goto bmda_checkout
73 :bmda_update
74 @echo Fetch:  BMDA
75 pushd dolby_ip\bmda
76 call git fetch --tags origin
77 popd
79 :bmda_checkout
80 pushd dolby_ip\bmda
81 call git checkout %1
82 popd
84 :: *************************************************************************
85 :: ** Install CAR
86 :: *************************************************************************
87 if exist dolby_ip\car\nul goto car_update
88 @echo Clone:  CAR
89 call git clone %CAR_GIT_REPO% dolby_ip\car
90 if not exist dolby_ip\car goto car_error
91 goto car_checkout
92 :car_update
93 @echo Fetch:  CAR
94 pushd dolby_ip\car
95 call git fetch --tags origin
96 popd
98 :car_checkout
99 pushd dolby_ip\car
100 call git checkout %1
101 popd
103 :: *************************************************************************
104 :: ** Install DDP
105 :: *************************************************************************
106 if exist dolby_ip\ddp\nul goto ddp_update
107 @echo Clone:  DDP
108 call git clone %DDP_GIT_REPO% dolby_ip\ddp
109 if not exist dolby_ip\ddp goto ddp_error
110 goto ddp_checkout
111 :ddp_update
112 @echo Fetch:  DDP
113 pushd dolby_ip\ddp
114 call git fetch --tags origin
115 popd
117 :ddp_checkout
118 pushd dolby_ip\ddp
119 call git checkout %1
120 popd
122 :: *************************************************************************
123 :: ** Install Intrinsics
124 :: *************************************************************************
125 if exist dolby_ip\intrinsics\nul goto intr_update
126 @echo Clone:  Intrinsics
127 call git clone %INTR_GIT_REPO% dolby_ip\intrinsics
128 if not exist dolby_ip\intrinsics goto intr_error
129 goto intr_checkout
130 :intr_update
131 @echo Fetch:  Intrinsics
132 pushd dolby_ip\intrinsics
133 call git fetch --tags origin
134 popd
136 :intr_checkout
137 pushd dolby_ip\intrinsics
138 call git checkout %1
139 popd
141 :: *************************************************************************
142 :: ** Install MAT-THD
143 :: *************************************************************************
144 if exist dolby_ip\mat-thd\nul goto matthd_update
145 @echo Clone:  mat-thd
146 call git clone %MATTHD_GIT_REPO% dolby_ip\mat-thd
147 if not exist dolby_ip\mat-thd goto matthd_error
148 goto matthd_checkout
149 :matthd_update
150 @echo Fetch:  mat-thd
151 pushd dolby_ip\mat-thd
152 call git fetch --tags origin
153 popd
155 :matthd_checkout
156 pushd dolby_ip\mat-thd
157 call git checkout %1
158 popd
160 :: *************************************************************************
161 :: ** Install OAR
162 :: *************************************************************************
163 if exist dolby_ip\oar\nul goto oar_update
164 @echo Clone:  OAR
165 call git clone %OAR_GIT_REPO% dolby_ip\oar
166 if not exist dolby_ip\oar goto oar_error
167 goto oar_checkout
168 :oar_update
169 @echo Fetch:  OAR
170 pushd dolby_ip\oar
171 call git fetch --tags origin
172 popd
174 :oar_checkout
175 pushd dolby_ip\oar
176 call git checkout %1
177 popd
179 :: *************************************************************************
180 :: ** Install DTS
181 :: *************************************************************************
182 if exist 3p-ip-dts\nul goto dts_update
183 @echo Clone:  DTS
184 call git clone %DTS_GIT_REPO% 3p-ip-dts
185 if not exist 3p-ip-dts goto dts_error
186 goto dts_checkout
187 :dts_update
188 @echo Fetch:  DTS
189 pushd 3p-ip-dts
190 call git fetch --tags origin
191 popd
193 :dts_checkout
194 pushd 3p-ip-dts
195 call git checkout %1
196 popd
198 :: *************************************************************************
199 :: ** Install PAF
200 :: *************************************************************************
201 if exist pasdk\paf\nul goto paf_update
202 @echo Clone:  PAF
203 call git clone %PAF_GIT_REPO% pasdk\paf
204 if not exist pasdk\paf goto paf_error
205 goto paf_checkout
206 :paf_update
207 @echo Fetch:  PAF
208 pushd pasdk\paf
209 call git fetch --tags origin
210 popd
212 :paf_checkout
213 pushd pasdk\paf
214 call git checkout %1
215 popd
217 :: *************************************************************************
218 :: ** Install Tools
219 :: *************************************************************************
220 if exist tools\nul goto tools_update
221 @echo Clone:  Tools
222 call git clone %TOOLS_GIT_REPO% tools
223 if not exist tools goto tools_error
224 goto tools_checkout
225 :tools_update
226 @echo Fetch:  Tools
227 pushd tools
228 call git fetch --tags origin
229 popd
231 :tools_checkout
232 pushd tools
233 call git checkout %1
234 popd
236 :: *************************************************************************
237 :: ** Report errors
238 :: *************************************************************************
239 goto install_end
241 :bmda_error
242 @echo Unable to clone BMDA GIT repository:  %BMDA_GIT_REPO%  exiting...
243 goto install_end
245 :car_error
246 @echo Unable to clone CAR GIT repository:  %CAR_GIT_REPO%  exiting...
247 goto install_end
249 :ddp_error
250 @echo Unable to clone DDP GIT repository:  %DDP_GIT_REPO%  exiting...
251 goto install_end
253 :intr_error
254 @echo Unable to clone Intrinsics GIT repository:  %INTR_GIT_REPO%  exiting...
255 goto install_end
257 :matthd_error
258 @echo Unable to clone MAT-THD GIT repository:  %MATTHD_GIT_REPO%  exiting...
259 goto install_end
261 :oar_error
262 @echo Unable to clone OAR GIT repository:  %OAR_GIT_REPO%  exiting...
263 goto install_end
265 :dts_error
266 @echo Unable to clone DTS GIT repository:  %DTS_GIT_REPO%  exiting...
267 goto install_end
269 :tools_error
270 @echo Unable to clone Tools GIT repository:  %TOOLS_GIT_REPO%  exiting...
271 goto install_end
273 :paf_error
274 @echo Unable to clone PAF GIT repository:  %PAF_GIT_REPO%  exiting...
275 goto install_end
277 :: *************************************************************************
278 :: *** Cleanup and return
279 :: *************************************************************************
280 :install_end
281 set PATH=%SAVE_PATH%
282 set SAVE_PATH=
284 set HOME=
285 set BMDA_GIT_REPO=
286 set CAR_GIT_REPO=
287 set DDP_GIT_REPO=
288 set INTR_GIT_REPO=
289 set MATTHD_GIT_REPO=
290 set OAR_GIT_REPO=
291 set DTS_GIT_REPO=
292 set PAF_GIT_REPO=
293 set TOOLS_GIT_REPO=
294 set http_proxy=
296 :end
297 :: *************************************************************************
298 :: *** Nothing past this point
299 :: *************************************************************************