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 script will try to find if svn and python are accessible and it not, | 6 :: This script will try to find if svn and python are accessible and it not, |
7 :: it will try to download it and 'install' it in depot_tools. | 7 :: it will try to download it and 'install' it in depot_tools. |
8 | 8 |
9 :: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly | 9 :: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly |
10 :: returned. | 10 :: returned. |
11 | 11 |
12 set WIN_TOOLS_ROOT_URL=http://src.chromium.org/svn/trunk/tools | 12 set WIN_TOOLS_ROOT_URL=http://src.chromium.org/svn/trunk/tools |
13 set WIN_TOOLS_ROOT_DIR=%~dp0..\.. | 13 set WIN_TOOLS_ROOT_DIR=%~dp0..\.. |
14 | 14 |
15 if "%1" == "force" ( | 15 if "%1" == "force" ( |
16 set WIN_TOOLS_FORCE=1 | 16 set WIN_TOOLS_FORCE=1 |
17 shift /1 | 17 shift /1 |
18 ) | 18 ) |
19 | 19 |
20 :SVN_CHECK | 20 :SVN_CHECK |
21 :: If the batch file exists, skip the svn check. | 21 :: If the batch file exists, skip the svn check. |
22 if exist "%WIN_TOOLS_ROOT_DIR%\svn.bat" goto :PYTHON_CHECK | 22 if exist "%WIN_TOOLS_ROOT_DIR%\svn.bat" goto :PYTHON_CHECK |
23 if "%WIN_TOOLS_FORCE%" == "1" goto :SVN_FORCE | 23 if "%WIN_TOOLS_FORCE%" == "1" goto :SVN_INSTALL |
24 call svn --version 2>nul 1>nul | 24 call svn --version 2>nul 1>nul |
25 if errorlevel 1 goto :SVN_INSTALL | 25 if errorlevel 1 goto :SVN_INSTALL |
26 goto :PYTHON_CHECK | 26 goto :PYTHON_CHECK |
27 | 27 |
28 | 28 |
29 :SVN_INSTALL | 29 :SVN_INSTALL |
30 echo Installing subversion ... | 30 echo Installing subversion ... |
31 :: svn is not accessible; check it out and create 'proxy' files. | 31 :: svn is not accessible; check it out and create 'proxy' files. |
32 if exist "%~dp0svn.7z" del "%~dp0svn.7z" | 32 if exist "%~dp0svn.7z" del "%~dp0svn.7z" |
33 cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party
/svn_win_client.zip "%~dp0svn.zip" | 33 cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party
/svn_win_client.zip "%~dp0svn.zip" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 goto :END | 86 goto :END |
87 | 87 |
88 | 88 |
89 :returncode | 89 :returncode |
90 set WIN_TOOLS_ROOT_URL= | 90 set WIN_TOOLS_ROOT_URL= |
91 set WIN_TOOLS_ROOT_DIR= | 91 set WIN_TOOLS_ROOT_DIR= |
92 exit /b %ERRORLEVEL% | 92 exit /b %ERRORLEVEL% |
93 | 93 |
94 :END | 94 :END |
95 call :returncode %ERRORLEVEL% | 95 call :returncode %ERRORLEVEL% |
OLD | NEW |