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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. | 51 :: Ensure autocrlf and filemode are set correctly. |
52 call %WIN_TOOLS_ROOT_DIR%\git.bat config --global core.autocrlf false | 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 | 53 call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --global core.filemode false |
54 goto :SVN_CHECK | 54 goto :SVN_CHECK |
55 | 55 |
56 | 56 |
57 :GIT_FAIL | 57 :GIT_FAIL |
58 echo ... Failed to checkout git automatically. | 58 echo ... Failed to checkout git automatically. |
59 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 |
60 echo client before continuing. | 60 echo client before continuing. |
61 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%/ |
62 set ERRORLEVEL=1 | 62 set ERRORLEVEL=1 |
63 goto :END | 63 goto :END |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 goto :END | 135 goto :END |
136 | 136 |
137 | 137 |
138 :returncode | 138 :returncode |
139 set WIN_TOOLS_ROOT_URL= | 139 set WIN_TOOLS_ROOT_URL= |
140 set WIN_TOOLS_ROOT_DIR= | 140 set WIN_TOOLS_ROOT_DIR= |
141 exit /b %ERRORLEVEL% | 141 exit /b %ERRORLEVEL% |
142 | 142 |
143 :END | 143 :END |
144 call :returncode %ERRORLEVEL% | 144 call :returncode %ERRORLEVEL% |
OLD | NEW |