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