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

Unified Diff: depot_tools/bootstrap/win/win_tools.bat

Issue 92087: Create the Next Generation of depot_tools. Eh. (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/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 | « depot_tools/bootstrap/win/wget.exe ('k') | depot_tools/chrome-update.bat » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: depot_tools/bootstrap/win/win_tools.bat
===================================================================
--- depot_tools/bootstrap/win/win_tools.bat (revision 0)
+++ depot_tools/bootstrap/win/win_tools.bat (revision 0)
@@ -0,0 +1,65 @@
+@echo off
+:: Copyright (c) 2009 The Chromium Authors. All rights reserved.
+:: Use of this source code is governed by a BSD-style license that can be
+:: found in the LICENSE file.
+
+:: This script will try to find if svn and python are accessible and it not,
+:: it will try to download it and 'install' it in depot_tools.
+
+SETLOCAL
+
+set ROOT_URL=http://src.chromium.org/svn/trunk/tools
+set ROOT_DIR=%~dp0..\..
+
+:: If the batch file exists, skip the svn check.
+if exist "%ROOT_DIR%\svn.bat" goto :PYTHON
+call svn --version 2>nul 1>nul
+if errorlevel 1 call :C_SVN
+
+:PYTHON
+:: If the batch file exists, skip the python check.
+if exist "%ROOT_DIR%\python.bat" goto :EOF
+call python --version 2>nul 1>nul
+if errorlevel 1 call :C_PYTHON
+
+:: We are done.
+goto :EOF
+
+
+:C_SVN
+echo Installing subversion ...
+:: svn is not accessible; check it out and create 'proxy' files.
+call "%~dp0wget" -q %ROOT_URL%/third_party/svn.7z -O "%~dp0svn.7z"
+if errorlevel 1 goto :SVN_FAIL
+call "%~dp07za" x "%~dp0svn.7z" %ROOT_DIR%
+if errorlevel 1 goto :SVN_FAIL
+del "%~dp0svn.7z"
+:: Create the batch file.
+copy "%~dp0svn.bat" "%ROOT_DIR%"
+goto :EOF
+
+
+:SVN_FAIL
+echo Failed to checkout svn automatically.
+echo Please visit http://subversion.tigris.org to download the latest subversion client
+echo before continuing.
+echo You can also get the "prebacked" version used at %ROOT_URL%/third_party/
+:: Still try python.
+goto :C_PYTHON
+
+
+:C_PYTHON
+echo Installing python ...
+call svn co %ROOT_URL%/third_party/python "%ROOT_DIR%\python"
+if errorlevel 1 goto :PYTHON_FAIL
+:: Create the batch file.
+copy "%~dp0python.bat" "%ROOT_DIR%"
+goto :EOF
+
+
+:PYTHON_FAIL
+echo Failed to checkout python automatically.
+echo Please visit http://python.org to download the latest python 2.x client before
+echo continuing.
+echo You can also get the "prebacked" version used at %ROOT_URL%/third_party/
+goto :EOF
Property changes on: depot_tools\bootstrap\win\win_tools.bat
___________________________________________________________________
Added: svn:eol-style
+ native
« no previous file with comments | « depot_tools/bootstrap/win/wget.exe ('k') | depot_tools/chrome-update.bat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698