OLD | NEW |
1 @echo off | 1 @echo off |
2 :: Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 :: Copyright (c) 2012 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. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 if errorlevel 1 goto :PYTHON_INSTALL | 119 if errorlevel 1 goto :PYTHON_INSTALL |
120 | 120 |
121 :: We are done. | 121 :: We are done. |
122 set ERRORLEVEL=0 | 122 set ERRORLEVEL=0 |
123 goto :END | 123 goto :END |
124 | 124 |
125 | 125 |
126 :PYTHON_INSTALL | 126 :PYTHON_INSTALL |
127 echo Installing python ... | 127 echo Installing python ... |
128 :: Cleanup python directory if it was existing. | 128 :: Cleanup python directory if it was existing. |
129 if exist "%WIN_TOOLS_ROOT_DIR%\python_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\pyth
on_bin" | 129 if exist "%WIN_TOOLS_ROOT_DIR%\python_274\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\pyth
on_274" |
130 call svn co -q %WIN_TOOLS_ROOT_URL%/third_party/python_26 "%WIN_TOOLS_ROOT_DIR%\
python_bin" | 130 call svn co -q %WIN_TOOLS_ROOT_URL%/third_party/python_274 "%WIN_TOOLS_ROOT_DIR%
\python_274" |
131 if errorlevel 1 goto :PYTHON_FAIL | 131 if errorlevel 1 goto :PYTHON_FAIL |
132 :: Create the batch files. | 132 :: Create the batch files. |
133 call copy /y "%~dp0python.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul | 133 call copy /y "%~dp0python.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul |
134 call copy /y "%~dp0pylint.new.bat" "%WIN_TOOLS_ROOT_DIR%\pylint.bat" 1>nul | 134 call copy /y "%~dp0pylint.new.bat" "%WIN_TOOLS_ROOT_DIR%\pylint.bat" 1>nul |
135 set ERRORLEVEL=0 | 135 set ERRORLEVEL=0 |
136 goto :END | 136 goto :END |
137 | 137 |
138 | 138 |
139 :PYTHON_FAIL | 139 :PYTHON_FAIL |
140 echo ... Failed to checkout python automatically. | 140 echo ... Failed to checkout python automatically. |
141 echo Please visit http://python.org to download the latest python 2.x client bef
ore | 141 echo Please visit http://python.org to download the latest python 2.7.x client b
efore |
142 echo continuing. | 142 echo continuing. |
143 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third
_party/ | 143 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third
_party/ |
144 set ERRORLEVEL=1 | 144 set ERRORLEVEL=1 |
145 goto :END | 145 goto :END |
146 | 146 |
147 | 147 |
148 :returncode | 148 :returncode |
149 set WIN_TOOLS_ROOT_URL= | 149 set WIN_TOOLS_ROOT_URL= |
150 set WIN_TOOLS_ROOT_DIR= | 150 set WIN_TOOLS_ROOT_DIR= |
151 exit /b %ERRORLEVEL% | 151 exit /b %ERRORLEVEL% |
152 | 152 |
153 :END | 153 :END |
154 call :returncode %ERRORLEVEL% | 154 call :returncode %ERRORLEVEL% |
OLD | NEW |