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. |
(...skipping 30 matching lines...) Expand all Loading... |
41 :: Will create git_bin\... | 41 :: Will create git_bin\... |
42 cscript //nologo //e:jscript "%~dp0unzip.js" "%~dp0git.zip" "%WIN_TOOLS_ROOT_DIR
%" | 42 cscript //nologo //e:jscript "%~dp0unzip.js" "%~dp0git.zip" "%WIN_TOOLS_ROOT_DIR
%" |
43 if errorlevel 1 goto :GIT_FAIL | 43 if errorlevel 1 goto :GIT_FAIL |
44 if not exist "%WIN_TOOLS_ROOT_DIR%\git_bin\." goto :GIT_FAIL | 44 if not exist "%WIN_TOOLS_ROOT_DIR%\git_bin\." goto :GIT_FAIL |
45 del "%~dp0git.zip" | 45 del "%~dp0git.zip" |
46 :: Create the batch files. | 46 :: Create the batch files. |
47 call copy /y "%WIN_TOOLS_ROOT_DIR%\git_bin\git.bat" "%WIN_TOOLS_ROOT_DIR%\git.ba
t" 1>nul | 47 call copy /y "%WIN_TOOLS_ROOT_DIR%\git_bin\git.bat" "%WIN_TOOLS_ROOT_DIR%\git.ba
t" 1>nul |
48 call copy /y "%WIN_TOOLS_ROOT_DIR%\git_bin\gitk.bat" "%WIN_TOOLS_ROOT_DIR%\gitk.
bat" 1>nul | 48 call copy /y "%WIN_TOOLS_ROOT_DIR%\git_bin\gitk.bat" "%WIN_TOOLS_ROOT_DIR%\gitk.
bat" 1>nul |
49 call copy /y "%WIN_TOOLS_ROOT_DIR%\git_bin\ssh.bat" "%WIN_TOOLS_ROOT_DIR%\ssh.ba
t" 1>nul | 49 call copy /y "%WIN_TOOLS_ROOT_DIR%\git_bin\ssh.bat" "%WIN_TOOLS_ROOT_DIR%\ssh.ba
t" 1>nul |
50 call copy /y "%WIN_TOOLS_ROOT_DIR%\git_bin\ssh-keygen.bat" "%WIN_TOOLS_ROOT_DIR%
\ssh-keygen.bat" 1>nul | 50 call copy /y "%WIN_TOOLS_ROOT_DIR%\git_bin\ssh-keygen.bat" "%WIN_TOOLS_ROOT_DIR%
\ssh-keygen.bat" 1>nul |
| 51 :: Ensure autocrlf and filemode are set correctly. |
| 52 call %WIN_TOOLS_ROOT_DIR%\git.bat config --global core.autocrlf false |
| 53 call %WIN_TOOLS_ROOT_DIR%\git.bat config --global core.filemode false |
51 goto :SVN_CHECK | 54 goto :SVN_CHECK |
52 | 55 |
53 | 56 |
54 :GIT_FAIL | 57 :GIT_FAIL |
55 echo ... Failed to checkout git automatically. | 58 echo ... Failed to checkout git automatically. |
56 echo Please visit http://code.google.com/p/msysgit to download the latest git | 59 echo Please visit http://code.google.com/p/msysgit to download the latest git |
57 echo client before continuing. | 60 echo client before continuing. |
58 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/ | 61 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/ |
59 set ERRORLEVEL=1 | 62 set ERRORLEVEL=1 |
60 goto :END | 63 goto :END |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 goto :END | 135 goto :END |
133 | 136 |
134 | 137 |
135 :returncode | 138 :returncode |
136 set WIN_TOOLS_ROOT_URL= | 139 set WIN_TOOLS_ROOT_URL= |
137 set WIN_TOOLS_ROOT_DIR= | 140 set WIN_TOOLS_ROOT_DIR= |
138 exit /b %ERRORLEVEL% | 141 exit /b %ERRORLEVEL% |
139 | 142 |
140 :END | 143 :END |
141 call :returncode %ERRORLEVEL% | 144 call :returncode %ERRORLEVEL% |
OLD | NEW |