Chromium Code Reviews| Index: bootstrap/win/win_tools.bat |
| =================================================================== |
| --- bootstrap/win/win_tools.bat (revision 85464) |
| +++ bootstrap/win/win_tools.bat (working copy) |
| @@ -1,5 +1,5 @@ |
| @echo off |
| -:: Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| +:: Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| :: Use of this source code is governed by a BSD-style license that can be |
| :: found in the LICENSE file. |
| @@ -21,6 +21,47 @@ |
| shift /1 |
| ) |
| + |
| +:GIT_CHECK |
| +:: If the batch file exists, skip the git check. |
| +if exist "%WIN_TOOLS_ROOT_DIR%\git.bat" goto :SVN_CHECK |
| +if "%GIT_TOOLS_FORCE%" == "1" goto :GIT_INSTALL |
| +@rem call git --version 2>nul 1>nul |
|
M-A Ruel
2011/05/16 19:26:02
Use ":: call git ..." instead of "@rem call git ..
cmp
2011/05/16 19:39:41
Done. I removed lines 29-30 and replaced with a :
|
| +@rem if errorlevel 1 goto :GIT_INSTALL |
| +goto :SVN_CHECK |
| + |
| + |
| +:GIT_INSTALL |
| +echo Installing git ... |
| +:: git is not accessible; check it out and create 'proxy' files. |
| +if exist "%~dp0git.zip" del "%~dp0git.zip" |
| +cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/git_bin.zip "%~dp0git.zip" |
| +if errorlevel 1 goto :GIT_FAIL |
| +:: Cleanup svn directory if it was existing. |
| +if exist "%WIN_TOOLS_ROOT_DIR%\git\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\git" |
| +if exist "%WIN_TOOLS_ROOT_DIR%\git_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\git_bin" |
| +:: Will create git_bin\... |
| +cscript //nologo //e:jscript "%~dp0unzip.js" "%~dp0git.zip" "%WIN_TOOLS_ROOT_DIR%" |
| +if errorlevel 1 goto :GIT_FAIL |
| +if not exist "%WIN_TOOLS_ROOT_DIR%\git_bin\." goto :GIT_FAIL |
| +del "%~dp0git.zip" |
| +:: Create the batch files and win32pad. |
| +call copy /y "%~dp0git.bat" "%WIN_TOOLS_ROOT_DIR%\git.bat" 1>nul |
| +call copy /y "%~dp0ssh.bat" "%WIN_TOOLS_ROOT_DIR%\ssh.bat" 1>nul |
| +call copy /y "%~dp0win32pad.exe" "%WIN_TOOLS_ROOT_DIR%\win32pad.exe" 1>nul |
| +call copy /y "%~dp0README.win32pad" "%WIN_TOOLS_ROOT_DIR%\README.win32pad" 1>nul |
| +goto :SVN_CHECK |
| + |
| + |
| +:GIT_FAIL |
| +echo ... Failed to checkout git automatically. |
| +echo Please visit http://code.google.com/p/msysgit to download the latest git |
| +echo client before continuing. |
| +echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/ |
| +set ERRORLEVEL=1 |
| +goto :END |
| + |
| + |
| :SVN_CHECK |
| :: If the batch file exists, skip the svn check. |
| if exist "%WIN_TOOLS_ROOT_DIR%\svn.bat" goto :PYTHON_CHECK |