| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 set GIT_VERSION=1.9.5.chromium.6 | 61 set GIT_VERSION=1.9.5.chromium.6 |
| 62 ) else ( | 62 ) else ( |
| 63 set GIT_VERSION=1.9.5.chromium.6 | 63 set GIT_VERSION=1.9.5.chromium.6 |
| 64 ) | 64 ) |
| 65 for /f "tokens=2 delims=[]" %%i in ('ver') do set VERSTR=%%i | 65 for /f "tokens=2 delims=[]" %%i in ('ver') do set VERSTR=%%i |
| 66 for /f "tokens=2,3 delims=. " %%i in ("%VERSTR%") do (set VERMAJOR=%%i & set VER
MINOR=%%j) | 66 for /f "tokens=2,3 delims=. " %%i in ("%VERSTR%") do (set VERMAJOR=%%i & set VER
MINOR=%%j) |
| 67 if %VERMAJOR% lss 5 set GIT_VERSION=%GIT_VERSION%-xp | 67 if %VERMAJOR% lss 5 set GIT_VERSION=%GIT_VERSION%-xp |
| 68 if %VERMAJOR% equ 5 if %VERMINOR% lss 2 set GIT_VERSION=%GIT_VERSION%-xp | 68 if %VERMAJOR% equ 5 if %VERMINOR% lss 2 set GIT_VERSION=%GIT_VERSION%-xp |
| 69 | 69 |
| 70 :: Clean up any release which doesn't match the one we want. | 70 :: Clean up any release which doesn't match the one we want. |
| 71 for /d %%i in (%WIN_TOOLS_ROOT_DIR%\git-*_bin) do ( | 71 for /d %%i in ("%WIN_TOOLS_ROOT_DIR%\git-*_bin") do ( |
| 72 if not %%i == %WIN_TOOLS_ROOT_DIR%\git-%GIT_VERSION%_bin ( | 72 if not "%%i" == "%WIN_TOOLS_ROOT_DIR%\git-%GIT_VERSION%_bin" ( |
| 73 rmdir /s /q "%%i" | 73 rmdir /s /q "%%i" |
| 74 ) | 74 ) |
| 75 ) | 75 ) |
| 76 set GIT_BIN_DIR=git-%GIT_VERSION%_bin | 76 set GIT_BIN_DIR=git-%GIT_VERSION%_bin |
| 77 set GIT_ZIP_FILE=%GIT_BIN_DIR%.zip | 77 set GIT_ZIP_FILE=%GIT_BIN_DIR%.zip |
| 78 set GIT_ZIP_URL=https://commondatastorage.googleapis.com/chrome-infra/%GIT_ZIP_F
ILE% | 78 set GIT_ZIP_URL=https://commondatastorage.googleapis.com/chrome-infra/%GIT_ZIP_F
ILE% |
| 79 | 79 |
| 80 if "%WIN_TOOLS_FORCE%" == "1" goto :GIT_INSTALL | 80 if "%WIN_TOOLS_FORCE%" == "1" goto :GIT_INSTALL |
| 81 if exist "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\cmd\git.cmd" ( | 81 if exist "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\cmd\git.cmd" ( |
| 82 call "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\cmd\git.cmd" --version 2>nul 1>nul | 82 call "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\cmd\git.cmd" --version 2>nul 1>nul |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 goto :END | 164 goto :END |
| 165 | 165 |
| 166 | 166 |
| 167 :returncode | 167 :returncode |
| 168 set WIN_TOOLS_ROOT_URL= | 168 set WIN_TOOLS_ROOT_URL= |
| 169 set WIN_TOOLS_ROOT_DIR= | 169 set WIN_TOOLS_ROOT_DIR= |
| 170 exit /b %ERRORLEVEL% | 170 exit /b %ERRORLEVEL% |
| 171 | 171 |
| 172 :END | 172 :END |
| 173 call :returncode %ERRORLEVEL% | 173 call :returncode %ERRORLEVEL% |
| OLD | NEW |