| OLD | NEW |
| 1 @echo off | 1 @echo off |
| 2 :: Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 :: Copyright (c) 2011 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 | 13 |
| 14 :: Get absolute root directory (.js scripts don't handle relative paths well). | 14 :: Get absolute root directory (.js scripts don't handle relative paths well). |
| 15 pushd %~dp0..\.. | 15 pushd %~dp0..\.. |
| 16 set WIN_TOOLS_ROOT_DIR=%CD% | 16 set WIN_TOOLS_ROOT_DIR=%CD% |
| 17 popd | 17 popd |
| 18 | 18 |
| 19 if "%1" == "force" ( | 19 if "%1" == "force" ( |
| 20 set WIN_TOOLS_FORCE=1 | 20 set WIN_TOOLS_FORCE=1 |
| 21 shift /1 | 21 shift /1 |
| 22 ) | 22 ) |
| 23 | 23 |
| 24 | 24 |
| 25 :GIT_CHECK | 25 :GIT_CHECK |
| 26 :: If the batch file exists, skip the git check. | 26 :: If the batch file exists, skip the git check. |
| 27 if exist "%WIN_TOOLS_ROOT_DIR%\git.bat" goto :SVN_CHECK | 27 if exist "%WIN_TOOLS_ROOT_DIR%\git.bat" goto :SVN_CHECK |
| 28 if "%CHROME_HEADLESS%" == "1" goto :SVN_CHECK |
| 28 if "%WIN_TOOLS_FORCE%" == "1" goto :GIT_INSTALL | 29 if "%WIN_TOOLS_FORCE%" == "1" goto :GIT_INSTALL |
| 29 call git --version 2>nul 1>nul | 30 call git --version 2>nul 1>nul |
| 30 if errorlevel 1 goto :GIT_INSTALL | 31 if errorlevel 1 goto :GIT_INSTALL |
| 31 goto :SVN_CHECK | 32 goto :SVN_CHECK |
| 32 | 33 |
| 33 | 34 |
| 34 :GIT_INSTALL | 35 :GIT_INSTALL |
| 35 echo Installing git (avg 1-2 min download) ... | 36 echo Installing git (avg 1-2 min download) ... |
| 36 :: git is not accessible; check it out and create 'proxy' files. | 37 :: git is not accessible; check it out and create 'proxy' files. |
| 37 if exist "%~dp0git.zip" del "%~dp0git.zip" | 38 if exist "%~dp0git.zip" del "%~dp0git.zip" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 goto :END | 137 goto :END |
| 137 | 138 |
| 138 | 139 |
| 139 :returncode | 140 :returncode |
| 140 set WIN_TOOLS_ROOT_URL= | 141 set WIN_TOOLS_ROOT_URL= |
| 141 set WIN_TOOLS_ROOT_DIR= | 142 set WIN_TOOLS_ROOT_DIR= |
| 142 exit /b %ERRORLEVEL% | 143 exit /b %ERRORLEVEL% |
| 143 | 144 |
| 144 :END | 145 :END |
| 145 call :returncode %ERRORLEVEL% | 146 call :returncode %ERRORLEVEL% |
| OLD | NEW |