Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 @echo off | 1 @echo off |
| 2 :: Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 :: Copyright (c) 2012 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 batch file will try to sync the root directory. | 6 :: This batch file will try to sync the root directory. |
| 7 | 7 |
| 8 setlocal | 8 setlocal |
| 9 | 9 |
| 10 :: Windows freaks out if a file is overwritten while it's being executed. Copy | 10 :: Windows freaks out if a file is overwritten while it's being executed. Copy |
| 11 :: this script off to a temporary location and reinvoke from there before | 11 :: this script off to a temporary location and reinvoke from there before |
| 12 :: running any svn or git commands. | 12 :: running any svn or git commands. |
| 13 IF %~nx0==update_depot_tools.bat ( | 13 IF %~nx0==update_depot_tools.bat ( |
| 14 COPY /Y %~dp0update_depot_tools.bat %TEMP%\update_depot_tools_tmp.bat >nul | 14 COPY /Y %~dp0update_depot_tools.bat %TEMP%\update_depot_tools_tmp.bat >nul |
| 15 if errorlevel 1 goto :EOF | 15 if errorlevel 1 goto :EOF |
| 16 %TEMP%\update_depot_tools_tmp.bat %~dp0 %* | 16 %TEMP%\update_depot_tools_tmp.bat %~dp0 %* |
| 17 ) | 17 ) |
| 18 | 18 |
| 19 set DEPOT_TOOLS_DIR=%1 | 19 set DEPOT_TOOLS_DIR=%1 |
| 20 SHIFT | 20 SHIFT |
| 21 | 21 |
| 22 set GIT_URL=https://chromium.googlesource.com/chromium/tools/depot_tools.git | 22 set GIT_URL=https://chromium.googlesource.com/chromium/tools/depot_tools.git |
| 23 | 23 |
| 24 :: Will download svn and python. | 24 :: Will download svn and python. |
|
mmoss
2014/03/19 05:11:15
and git.
szager1
2014/03/19 05:41:57
Done.
| |
| 25 :: If you don't want to install the depot_tools version of these tools, remove | 25 call "%DEPOT_TOOLS_DIR%bootstrap\win\win_tools.bat" |
| 26 :: the 'force' option on the next command. The tools will be installed only if | |
| 27 :: not already in the PATH environment variable. | |
| 28 call "%DEPOT_TOOLS_DIR%bootstrap\win\win_tools.bat" force | |
| 29 if errorlevel 1 goto :EOF | 26 if errorlevel 1 goto :EOF |
| 30 :: Now clear errorlevel so it can be set by other programs later. | 27 :: Now clear errorlevel so it can be set by other programs later. |
| 31 set errorlevel= | 28 set errorlevel= |
| 32 | 29 |
| 33 :: Shall skip automatic update? | 30 :: Shall skip automatic update? |
| 34 IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :EOF | 31 IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :EOF |
| 35 | 32 |
| 36 :: We need either .\.svn\. or .\.git\. to be able to sync. | 33 :: We need either .\.svn\. or .\.git\. to be able to sync. |
| 37 IF EXIST "%DEPOT_TOOLS_DIR%.svn\." GOTO :SVN_UPDATE | 34 IF EXIST "%DEPOT_TOOLS_DIR%.svn\." GOTO :SVN_UPDATE |
| 38 IF EXIST "%DEPOT_TOOLS_DIR%.git\." GOTO :GIT_UPDATE | 35 IF EXIST "%DEPOT_TOOLS_DIR%.git\." GOTO :GIT_UPDATE |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 61 call git fetch -q origin > NUL | 58 call git fetch -q origin > NUL |
| 62 call git rebase -q origin/master > NUL | 59 call git rebase -q origin/master > NUL |
| 63 if errorlevel 1 echo Failed to update depot_tools. | 60 if errorlevel 1 echo Failed to update depot_tools. |
| 64 | 61 |
| 65 goto :EOF | 62 goto :EOF |
| 66 | 63 |
| 67 :GIT_SVN_UPDATE | 64 :GIT_SVN_UPDATE |
| 68 cd /d "%DEPOT_TOOLS_DIR%." | 65 cd /d "%DEPOT_TOOLS_DIR%." |
| 69 call git svn rebase -q -q | 66 call git svn rebase -q -q |
| 70 goto :EOF | 67 goto :EOF |
| OLD | NEW |