Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: bootstrap/win/win_tools.bat

Issue 11358128: git-1.8.0 requires TERM to be set appropriately for commands that (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bootstrap/win/win_tools.bat
===================================================================
--- bootstrap/win/win_tools.bat (revision 166283)
+++ bootstrap/win/win_tools.bat (working copy)
@@ -25,12 +25,12 @@
:GIT_CHECK
:: If the batch file exists, skip the git check.
-if exist "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%" goto :SVN_CHECK
-if "%CHROME_HEADLESS%" == "1" goto :SVN_CHECK
+if exist "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%" goto :MSYS_TERM_CHECK
+if "%CHROME_HEADLESS%" == "1" goto :MSYS_TERM_CHECK
if "%WIN_TOOLS_FORCE%" == "1" goto :GIT_INSTALL
call git --version 2>nul 1>nul
if errorlevel 1 goto :GIT_INSTALL
-goto :SVN_CHECK
+goto :MSYS_TERM_CHECK
:GIT_INSTALL
@@ -54,7 +54,7 @@
:: Ensure autocrlf and filemode are set correctly.
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --global core.autocrlf false
call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --global core.filemode false
-goto :SVN_CHECK
+goto :MSYS_TERM_CHECK
:GIT_FAIL
@@ -66,6 +66,17 @@
goto :END
+:MSYS_TERM_CHECK
+:: Tweak git.bat to set TERM appropriately
+call FIND "TERM" "%WIN_TOOLS_ROOT_DIR%\git.bat" 2>nul 1>nul
M-A Ruel 2012/11/07 01:34:07 personally I'd keep find, findstr and move lowerca
+IF errorlevel 1 (
+ FINDSTR /V "git\.cmd" "%WIN_TOOLS_ROOT_DIR%\git.bat" > git.bat.new
+ echo set TERM=msys >> git.bat.new
+ FINDSTR "git\.cmd" "%WIN_TOOLS_ROOT_DIR%\git.bat" >> git.bat.new
+ MOVE /Y git.bat.new "%WIN_TOOLS_ROOT_DIR%\git.bat" >nul
+)
+
+
:SVN_CHECK
:: If the batch file exists, skip the svn check.
if exist "%WIN_TOOLS_ROOT_DIR%\svn.bat" goto :PYTHON_CHECK
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698