Chromium Code Reviews| Index: bootstrap/win/win_tools.bat |
| diff --git a/bootstrap/win/win_tools.bat b/bootstrap/win/win_tools.bat |
| index 19ecb51ae01eb8a850e3f230f5951c4779220c94..f451c40df35ab8eebeaf3b44a7f9402bf95d18ca 100644 |
| --- a/bootstrap/win/win_tools.bat |
| +++ b/bootstrap/win/win_tools.bat |
| @@ -83,7 +83,7 @@ set GIT_EXE_PATH=%GIT_INST_DIR%\bin\git.exe |
| for /d %%i in ("%WIN_TOOLS_ROOT_DIR%\git-*_bin") do ( |
| if not "%%i" == "%WIN_TOOLS_ROOT_DIR%\git-%GIT_VERSION%_bin" ( |
| echo Cleaning old git installation %%i |
| - rmdir /s /q "%%i" |
| + rmdir /s /q "%%i" > NUL |
| ) |
| ) |
| @@ -97,7 +97,7 @@ if errorlevel 1 goto :GIT_INSTALL |
| :: Several git versions can live side-by-side; check the top-level |
| :: batch script to make sure it points to the desired version. |
| for %%f in (git.bat gitk.bat ssh.bat ssh-keygen.bat git-bash) do ( |
| - find "%GIT_BIN_DIR%" "%WIN_TOOLS_ROOT_DIR%\%%f" 2>nul 1>nul |
| + %FIND_EXE% "%GIT_BIN_DIR%" "%WIN_TOOLS_ROOT_DIR%\%%f" 2>nul 1>nul |
| if errorlevel 1 goto :GIT_MAKE_BATCH_FILES |
| ) |
| goto :SYNC_GIT_HELP_FILES |
| @@ -127,6 +127,8 @@ if errorlevel 1 goto :GIT_FAIL |
| del "%GIT_DOWNLOAD_PATH%" |
| if not exist "%GIT_INST_DIR%\." goto :GIT_FAIL |
| +set DID_UPGRADE=1 |
| + |
| :GIT_MAKE_BATCH_FILES |
| :: Create the batch files. |
| set GIT_TEMPL=%~dp0git.template.bat |
| @@ -154,6 +156,17 @@ call "%WIN_TOOLS_ROOT_DIR%\git.bat" config --system core.fscache true |
| :: /y : Don't prompt for overwrites (yes) |
| xcopy /i /q /d /y "%WIN_TOOLS_ROOT_DIR%\man\html\*" "%GIT_INST_DIR%\mingw64\share\doc\git-doc" > NUL |
| +:: MSYS users need to restart their shell. |
| +if defined MSYSTEM if defined DID_UPGRADE ( |
| + echo. |
| + echo. |
| + echo [1;31mIMPORTANT:[0m |
| + echo depot_tools' git distribution has been updated while inside of a MinGW |
| + echo shell. In order to complete the upgrade, please exit the shell and re-run |
| + echo `git bash` from cmd. |
| + exit 123 |
|
dnj
2016/04/04 15:19:30
If your'e going to do magic exit codes, please doc
Michael Moss
2016/04/04 16:19:38
Is it really a Windows tool if it has documented e
|
| +) |
| + |
| goto :SVN_CHECK |
| :GIT_FAIL |