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

Unified Diff: bootstrap/win/win_tools.bat

Issue 109035: - Add change-svn-wc-format.py utility from http://svn.collab.net/repos/svn/tr... (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: '' Created 11 years, 8 months 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 | « bootstrap/win/svn.bat ('k') | change-svn-wc-format.py » ('j') | 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 15317)
+++ bootstrap/win/win_tools.bat (working copy)
@@ -12,8 +12,14 @@
set WIN_TOOLS_ROOT_URL=http://src.chromium.org/svn/trunk/tools
set WIN_TOOLS_ROOT_DIR=%~dp0..\..
+if "%1" == "force" (
+ set WIN_TOOLS_FORCE=1
+ shift /1
+)
+
:SVN_CHECK
:: If the batch file exists, skip the svn check.
+if "%WIN_TOOLS_FORCE%" == "1" goto :SVN_INSTALL
if exist "%WIN_TOOLS_ROOT_DIR%\svn.bat" goto :PYTHON_CHECK
call svn --version 2>nul 1>nul
if errorlevel 1 goto :SVN_INSTALL
@@ -26,12 +32,14 @@
if exist "%~dp0svn.7z" del "%~dp0svn.7z"
cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party/svn_win_client.zip "%~dp0svn.zip"
if errorlevel 1 goto :SVN_FAIL
+:: Cleanup svn directory if it was existing.
+if exist "%WIN_TOOLS_ROOT_DIR%\svn\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\svn"
cscript //nologo //e:jscript "%~dp0unzip.js" "%~dp0svn.zip" "%WIN_TOOLS_ROOT_DIR%"
if errorlevel 1 goto :SVN_FAIL
if not exist "%WIN_TOOLS_ROOT_DIR%\svn\." goto :SVN_FAIL
del "%~dp0svn.zip"
:: Create the batch file.
-call copy /y "%~dp0svn.bat" "%WIN_TOOLS_ROOT_DIR%\svn.bat" 1>nul
+call copy /y "%~dp0svn.new.bat" "%WIN_TOOLS_ROOT_DIR%\svn.bat" 1>nul
goto :PYTHON_CHECK
@@ -46,6 +54,7 @@
:PYTHON_CHECK
:: If the batch file exists, skip the python check.
+if "%WIN_TOOLS_FORCE%" == "1" goto :PYTHON_INSTALL
set ERRORLEVEL=0
if exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :END
call python --version 2>nul 1>nul
@@ -58,10 +67,12 @@
:PYTHON_INSTALL
echo Installing python ...
+:: Cleanup python directory if it was existing.
+if exist "%WIN_TOOLS_ROOT_DIR%\python\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\python"
call svn co -q %WIN_TOOLS_ROOT_URL%/third_party/python "%WIN_TOOLS_ROOT_DIR%\python"
if errorlevel 1 goto :PYTHON_FAIL
:: Create the batch file.
-call copy /y "%~dp0python.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul
+call copy /y "%~dp0python.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul
set ERRORLEVEL=0
goto :END
« no previous file with comments | « bootstrap/win/svn.bat ('k') | change-svn-wc-format.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698