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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 :: (parens) are necessary, otherwise batch puts an extra space after 32. | 66 :: (parens) are necessary, otherwise batch puts an extra space after 32. |
67 reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | %FIND_EXE% /i
"x86" > NUL && (set OS_BITS=32) || (set OS_BITS=64) | 67 reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | %FIND_EXE% /i
"x86" > NUL && (set OS_BITS=32) || (set OS_BITS=64) |
68 | 68 |
69 if not exist "%WIN_TOOLS_ROOT_DIR%\.git_bleeding_edge" ( | 69 if not exist "%WIN_TOOLS_ROOT_DIR%\.git_bleeding_edge" ( |
70 set GIT_VERSION=2.7.4 | 70 set GIT_VERSION=2.7.4 |
71 ) else ( | 71 ) else ( |
72 set GIT_VERSION=2.7.4 | 72 set GIT_VERSION=2.7.4 |
73 ) | 73 ) |
74 set GIT_VERSION=%GIT_VERSION%-%OS_BITS% | 74 set GIT_VERSION=%GIT_VERSION%-%OS_BITS% |
75 | 75 |
76 set GIT_FETCH_URL=https://commondatastorage.googleapis.com/chrome-infra/Portable
Git-%GIT_VERSION%-bit.7z.exe | 76 set GIT_FETCH_URL=https://storage.googleapis.com/chrome-infra/PortableGit-%GIT_V
ERSION%-bit.7z.exe |
77 set GIT_DOWNLOAD_PATH=%ZIP_DIR%\git.7z.exe | 77 set GIT_DOWNLOAD_PATH=%ZIP_DIR%\git.7z.exe |
78 set GIT_BIN_DIR=git-%GIT_VERSION%_bin | 78 set GIT_BIN_DIR=git-%GIT_VERSION%_bin |
79 set GIT_INST_DIR=%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR% | 79 set GIT_INST_DIR=%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR% |
80 set GIT_EXE_PATH=%GIT_INST_DIR%\bin\git.exe | 80 set GIT_EXE_PATH=%GIT_INST_DIR%\bin\git.exe |
81 | 81 |
82 :: Clean up any release which doesn't match the one we want. | 82 :: Clean up any release which doesn't match the one we want. |
83 for /d %%i in ("%WIN_TOOLS_ROOT_DIR%\git-*_bin") do ( | 83 for /d %%i in ("%WIN_TOOLS_ROOT_DIR%\git-*_bin") do ( |
84 if not "%%i" == "%WIN_TOOLS_ROOT_DIR%\git-%GIT_VERSION%_bin" ( | 84 if not "%%i" == "%WIN_TOOLS_ROOT_DIR%\git-%GIT_VERSION%_bin" ( |
85 echo Cleaning old git installation %%i | 85 echo Cleaning old git installation %%i |
86 rmdir /s /q "%%i" | 86 rmdir /s /q "%%i" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 goto :END | 200 goto :END |
201 | 201 |
202 | 202 |
203 :returncode | 203 :returncode |
204 set WIN_TOOLS_ROOT_URL= | 204 set WIN_TOOLS_ROOT_URL= |
205 set WIN_TOOLS_ROOT_DIR= | 205 set WIN_TOOLS_ROOT_DIR= |
206 exit /b %ERRORLEVEL% | 206 exit /b %ERRORLEVEL% |
207 | 207 |
208 :END | 208 :END |
209 call :returncode %ERRORLEVEL% | 209 call :returncode %ERRORLEVEL% |
OLD | NEW |