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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third _party/ | 57 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third _party/ |
58 set ERRORLEVEL=1 | 58 set ERRORLEVEL=1 |
59 goto :END | 59 goto :END |
60 | 60 |
61 | 61 |
62 :GIT_CHECK | 62 :GIT_CHECK |
63 goto :GIT_190_CHECK | 63 goto :GIT_190_CHECK |
64 | 64 |
65 | 65 |
66 :GIT_190_CHECK | 66 :GIT_190_CHECK |
67 if "%DEPOT_TOOLS_GIT_BLEEDING%" == "1" goto :GIT_190_BLEEDING | |
68 set GIT_ERASE_TOP=2 | |
69 set GIT_VERSION=1.9.0.chromium.3 | |
70 goto :GIT_190_CHECK_REST | |
mmoss
2014/04/12 03:01:10
Should this stuff just go into :GIT_CHECK? I'm not
iannucci
2014/04/12 03:48:56
It's setting the version and the erase_top variabl
mmoss
2014/04/12 04:00:05
I just meant we have:
:GIT_CHECK
goto :GIT_190_CHE
| |
71 :GIT_190_BLEEDING | |
mmoss
2014/04/12 03:01:10
Nit: blank space above this makes it a little easi
iannucci
2014/04/12 03:48:56
Done.
| |
72 set GIT_ERASE_TOP=3 | |
73 set GIT_VERSION=1.9.0.chromium.4 | |
74 | |
75 :GIT_190_CHECK_REST | |
67 if "%DEPOT_TOOLS_GIT_190%" == "0" goto :GIT_1852_CHECK | 76 if "%DEPOT_TOOLS_GIT_190%" == "0" goto :GIT_1852_CHECK |
68 :: Clean up a couple of known broken releases | 77 :: Clean up a couple of known broken releases |
69 for /l %%i in (1,1,2) do if exist "%WIN_TOOLS_ROOT_DIR%\git-1.9.0.chromium.%%i_b in" ( | 78 for /l %%i in (1,1,%GIT_ERASE_TOP%) do if exist "%WIN_TOOLS_ROOT_DIR%\git-1.9.0. chromium.%%i_bin" ( |
70 rmdir /s /q "%WIN_TOOLS_ROOT_DIR%\git-1.9.0.chromium.%%i_bin" | 79 rmdir /s /q "%WIN_TOOLS_ROOT_DIR%\git-1.9.0.chromium.%%i_bin" |
71 ) | 80 ) |
72 set GIT_VERSION=1.9.0.chromium.3 | |
73 for /f "tokens=2 delims=[]" %%i in ('ver') do set VERSTR=%%i | 81 for /f "tokens=2 delims=[]" %%i in ('ver') do set VERSTR=%%i |
74 for /f "tokens=2,3 delims=. " %%i in ("%VERSTR%") do (set VERMAJOR=%%i & set VER MINOR=%%j) | 82 for /f "tokens=2,3 delims=. " %%i in ("%VERSTR%") do (set VERMAJOR=%%i & set VER MINOR=%%j) |
75 if %VERMAJOR% lss 5 set GIT_VERSION=1.9.0.chromium.3-xp | 83 if %VERMAJOR% lss 5 set GIT_VERSION=%GIT_VERSION%-xp |
76 if %VERMAJOR% equ 5 if %VERMINOR% lss 2 set GIT_VERSION=1.9.0.chromium.3-xp | 84 if %VERMAJOR% equ 5 if %VERMINOR% lss 2 set GIT_VERSION=%GIT_VERSION%-xp |
77 set GIT_BIN_DIR=git-%GIT_VERSION%_bin | 85 set GIT_BIN_DIR=git-%GIT_VERSION%_bin |
78 set GIT_ZIP_FILE=%GIT_BIN_DIR%.zip | 86 set GIT_ZIP_FILE=%GIT_BIN_DIR%.zip |
79 set GIT_ZIP_URL=https://commondatastorage.googleapis.com/chrome-infra/%GIT_ZIP_F ILE% | 87 set GIT_ZIP_URL=https://commondatastorage.googleapis.com/chrome-infra/%GIT_ZIP_F ILE% |
80 goto :GIT_COMMON | 88 goto :GIT_COMMON |
81 | 89 |
82 | 90 |
83 :GIT_1852_CHECK | 91 :GIT_1852_CHECK |
84 if "%DEPOT_TOOLS_GIT_1852%" == "0" goto :GIT_180_CHECK | 92 if "%DEPOT_TOOLS_GIT_1852%" == "0" goto :GIT_180_CHECK |
85 set GIT_VERSION=1.8.5.2.chromium.1 | 93 set GIT_VERSION=1.8.5.2.chromium.1 |
86 set GIT_BIN_DIR=git-%GIT_VERSION%_bin | 94 set GIT_BIN_DIR=git-%GIT_VERSION%_bin |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
200 goto :END | 208 goto :END |
201 | 209 |
202 | 210 |
203 :returncode | 211 :returncode |
204 set WIN_TOOLS_ROOT_URL= | 212 set WIN_TOOLS_ROOT_URL= |
205 set WIN_TOOLS_ROOT_DIR= | 213 set WIN_TOOLS_ROOT_DIR= |
206 exit /b %ERRORLEVEL% | 214 exit /b %ERRORLEVEL% |
207 | 215 |
208 :END | 216 :END |
209 call :returncode %ERRORLEVEL% | 217 call :returncode %ERRORLEVEL% |
OLD | NEW |