OLD | NEW |
---|---|
1 @echo off | 1 @echo off |
2 :: Copyright (c) 2009 The Chromium Authors. All rights reserved. | 2 :: Copyright (c) 2009 The Chromium Authors. All rights reserved. |
3 :: Use of this source code is governed by a BSD-style license that can be | 3 :: Use of this source code is governed by a BSD-style license that can be |
4 :: found in the LICENSE file. | 4 :: found in the LICENSE file. |
5 | 5 |
6 :: This file is a stub to sync .\bootstrap first and defer control to | 6 :: This file is a stub to sync .\bootstrap first and defer control to |
7 :: .\bootstrap\gclient.bat, which will sync back '.'. This is unless auto | 7 :: .\bootstrap\gclient.bat, which will sync back '.'. This is unless auto |
8 :: update is disabled, were gclient.py is directly called. | 8 :: update is disabled, were gclient.py is directly called. |
9 setlocal | 9 setlocal |
10 | 10 |
11 :: This is required with cygwin only. | 11 :: This is required with cygwin only. |
12 PATH=%~dp0;%PATH% | 12 PATH=%~dp0;%PATH% |
13 | 13 |
14 :: Will download svn and python. | 14 :: Will download svn and python. |
15 :: If you don't want to install the depot_tools version of these tools, remove | 15 :: If you don't want to install the depot_tools version of these tools, remove |
16 :: the 'force' option on the next command. The tools won't be installed only if | 16 :: the 'force' option on the next command. The tools won't be installed only if |
17 :: not already in the PATH environment variable. | 17 :: not already in the PATH environment variable. |
18 call "%~dp0bootstrap\win\win_tools.bat" force | 18 call "%~dp0bootstrap\win\win_tools.bat" force |
19 if errorlevel 1 goto :EOF | 19 if errorlevel 1 goto :EOF |
20 | 20 |
21 :: Shall skip automatic update? | 21 :: Shall skip automatic update? |
22 IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :SKIP_UPDATE | 22 IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :POST_UPDATE |
23 :: We can't sync if .\.svn\. doesn't exist. | 23 :: We need either .\.svn\. or .\.git\. to be able to sync. |
24 IF NOT EXIST "%~dp0.svn\." GOTO :SKIP_UPDATE | 24 IF EXIST "%~dp0.svn\." GOTO :SVN_BOOTSTRAP |
25 IF EXIST "%~dp0.git\." GOTO :GIT_UPDATE | |
M-A Ruel
2012/03/20 15:19:13
IF EXIST "%~dp0.git\." GOTO :<line 35>
| |
26 echo Error syncing depot_tools, no revision tool found | |
27 goto :POST_UPDATE | |
25 | 28 |
29 :SVN_BOOTSTRAP | |
26 :: Sync the bootstrap directory. | 30 :: Sync the bootstrap directory. |
31 echo Updating depot_tools with SVN... | |
27 call svn up -q "%~dp0bootstrap" | 32 call svn up -q "%~dp0bootstrap" |
28 :: still continue even in case of error. | 33 :: still continue even in case of error. |
29 goto :UPDATE | |
30 | 34 |
31 | |
32 :SKIP_UPDATE | |
33 :: Don't bother to try to update any thing. | |
34 python "%~dp0\gclient.py" %* | |
35 goto :EOF | |
36 | |
37 | |
38 :UPDATE | |
39 :: Transfer control to ease the update process. The following lines won't be | 35 :: Transfer control to ease the update process. The following lines won't be |
40 :: executed so don't add any! Specifically, don't use 'call' in the following | 36 :: executed so don't add any! Specifically, don't use 'call' in the following |
41 :: line. | 37 :: line. |
42 "%~dp0bootstrap\gclient.bat" %* | 38 "%~dp0bootstrap\gclient.bat" %* |
43 goto :EOF | 39 goto :EOF |
40 | |
41 | |
42 :GIT_UPDATE | |
43 echo Updating depot_tools with Git... | |
44 :: The git workflow doesn't require a bootstrap. | |
45 set UPDATED_DIR=%CD% | |
46 cd %~dp0 | |
47 call git svn rebase -q -q | |
gab
2012/03/20 14:52:19
I noticed update_depot_tools uses -q -q for extra
M-A Ruel
2012/03/20 15:19:13
What,s the rest of the sync process? You mean the
| |
48 cd %UPDATED_DIR% | |
49 goto :POST_UPDATE | |
50 | |
51 | |
52 :POST_UPDATE | |
53 python "%~dp0\gclient.py" %* | |
54 goto :EOF | |
OLD | NEW |