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 "%WIN_TOOLS_FORCE%" == "1" goto :SVN_INSTALL | |
23 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 | |
sigurdur.asgeirsson_gmail.com
2009/05/07 14:38:25
Won't this skip the SVN install if svn is present,
| |
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 13 matching lines...) Expand all Loading... | |
47 echo ... Failed to checkout svn automatically. | 47 echo ... Failed to checkout svn automatically. |
48 echo Please visit http://subversion.tigris.org to download the latest subversion client | 48 echo Please visit http://subversion.tigris.org to download the latest subversion client |
49 echo before continuing. | 49 echo before continuing. |
50 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third _party/ | 50 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third _party/ |
51 set ERRORLEVEL=1 | 51 set ERRORLEVEL=1 |
52 goto :END | 52 goto :END |
53 | 53 |
54 | 54 |
55 :PYTHON_CHECK | 55 :PYTHON_CHECK |
56 :: If the batch file exists, skip the python check. | 56 :: If the batch file exists, skip the python check. |
57 if "%WIN_TOOLS_FORCE%" == "1" goto :PYTHON_INSTALL | |
58 set ERRORLEVEL=0 | 57 set ERRORLEVEL=0 |
59 if exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :END | 58 if exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :END |
59 if "%WIN_TOOLS_FORCE%" == "1" goto :PYTHON_INSTALL | |
sigurdur.asgeirsson_gmail.com
2009/05/07 14:38:25
ditto?
| |
60 call python --version 2>nul 1>nul | 60 call python --version 2>nul 1>nul |
61 if errorlevel 1 goto :PYTHON_INSTALL | 61 if errorlevel 1 goto :PYTHON_INSTALL |
62 | 62 |
63 :: We are done. | 63 :: We are done. |
64 set ERRORLEVEL=0 | 64 set ERRORLEVEL=0 |
65 goto :END | 65 goto :END |
66 | 66 |
67 | 67 |
68 :PYTHON_INSTALL | 68 :PYTHON_INSTALL |
69 echo Installing python ... | 69 echo Installing python ... |
(...skipping 16 matching lines...) Expand all 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 |