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

Unified Diff: bootstrap/win/win_tools.bat

Issue 11364056: Force win clients to update to git-1.8.0. (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 165702)
+++ bootstrap/win/win_tools.bat (working copy)
@@ -10,6 +10,7 @@
:: returned.
set WIN_TOOLS_ROOT_URL=http://src.chromium.org/svn/trunk/tools
+set GIT_BIN_DIR=git-1.8.0_bin
:: Get absolute root directory (.js scripts don't handle relative paths well).
pushd %~dp0..\..
@@ -24,7 +25,7 @@
:GIT_CHECK
:: If the batch file exists, skip the git check.
-if exist "%WIN_TOOLS_ROOT_DIR%\git.bat" goto :SVN_CHECK
+if not exist "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%" goto :GIT_INSTALL
if "%CHROME_HEADLESS%" == "1" goto :SVN_CHECK
if "%WIN_TOOLS_FORCE%" == "1" goto :GIT_INSTALL
call git --version 2>nul 1>nul
@@ -36,20 +37,20 @@
echo Installing git (avg 1-2 min download) ...
:: 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%/third_party/git_bin.zip "%~dp0git.zip"
+cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party/git-1.8.0_bin.zip "%~dp0git.zip"
if errorlevel 1 goto :GIT_FAIL
:: Cleanup svn directory if it was existing.
-if exist "%WIN_TOOLS_ROOT_DIR%\git_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\git_bin"
-:: Will create git_bin\...
+if exist "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%"
+:: Will create %GIT_BIN_DIR%\...
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
+if not exist "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\." goto :GIT_FAIL
del "%~dp0git.zip"
:: Create the batch files.
-call copy /y "%WIN_TOOLS_ROOT_DIR%\git_bin\git.bat" "%WIN_TOOLS_ROOT_DIR%\git.bat" 1>nul
-call copy /y "%WIN_TOOLS_ROOT_DIR%\git_bin\gitk.bat" "%WIN_TOOLS_ROOT_DIR%\gitk.bat" 1>nul
-call copy /y "%WIN_TOOLS_ROOT_DIR%\git_bin\ssh.bat" "%WIN_TOOLS_ROOT_DIR%\ssh.bat" 1>nul
-call copy /y "%WIN_TOOLS_ROOT_DIR%\git_bin\ssh-keygen.bat" "%WIN_TOOLS_ROOT_DIR%\ssh-keygen.bat" 1>nul
+call copy /y "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\git.bat" "%WIN_TOOLS_ROOT_DIR%\git.bat" 1>nul
+call copy /y "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\gitk.bat" "%WIN_TOOLS_ROOT_DIR%\gitk.bat" 1>nul
+call copy /y "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\ssh.bat" "%WIN_TOOLS_ROOT_DIR%\ssh.bat" 1>nul
+call copy /y "%WIN_TOOLS_ROOT_DIR%\%GIT_BIN_DIR%\ssh-keygen.bat" "%WIN_TOOLS_ROOT_DIR%\ssh-keygen.bat" 1>nul
:: 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
« 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