OLD | NEW |
(Empty) | |
| 1 @echo off |
| 2 :: Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 3 :: Use of this source code is governed by a BSD-style license that can be |
| 4 :: found in the LICENSE file. |
| 5 |
| 6 :: This script will try to find if svn and python are accessible and it not, |
| 7 :: it will try to download it and 'install' it in depot_tools. |
| 8 |
| 9 SETLOCAL |
| 10 |
| 11 set ROOT_URL=http://src.chromium.org/svn/trunk/tools |
| 12 set ROOT_DIR=%~dp0..\.. |
| 13 |
| 14 :: If the batch file exists, skip the svn check. |
| 15 if exist "%ROOT_DIR%\svn.bat" goto :PYTHON |
| 16 call svn --version 2>nul 1>nul |
| 17 if errorlevel 1 call :C_SVN |
| 18 |
| 19 :PYTHON |
| 20 :: If the batch file exists, skip the python check. |
| 21 if exist "%ROOT_DIR%\python.bat" goto :EOF |
| 22 call python --version 2>nul 1>nul |
| 23 if errorlevel 1 call :C_PYTHON |
| 24 |
| 25 :: We are done. |
| 26 goto :EOF |
| 27 |
| 28 |
| 29 :C_SVN |
| 30 echo Installing subversion ... |
| 31 :: svn is not accessible; check it out and create 'proxy' files. |
| 32 call "%~dp0wget" -q %ROOT_URL%/third_party/svn.7z -O "%~dp0svn.7z" |
| 33 if errorlevel 1 goto :SVN_FAIL |
| 34 call "%~dp07za" x "%~dp0svn.7z" %ROOT_DIR% |
| 35 if errorlevel 1 goto :SVN_FAIL |
| 36 del "%~dp0svn.7z" |
| 37 :: Create the batch file. |
| 38 copy "%~dp0svn.bat" "%ROOT_DIR%" |
| 39 goto :EOF |
| 40 |
| 41 |
| 42 :SVN_FAIL |
| 43 echo Failed to checkout svn automatically. |
| 44 echo Please visit http://subversion.tigris.org to download the latest subversion
client |
| 45 echo before continuing. |
| 46 echo You can also get the "prebacked" version used at %ROOT_URL%/third_party/ |
| 47 :: Still try python. |
| 48 goto :C_PYTHON |
| 49 |
| 50 |
| 51 :C_PYTHON |
| 52 echo Installing python ... |
| 53 call svn co %ROOT_URL%/third_party/python "%ROOT_DIR%\python" |
| 54 if errorlevel 1 goto :PYTHON_FAIL |
| 55 :: Create the batch file. |
| 56 copy "%~dp0python.bat" "%ROOT_DIR%" |
| 57 goto :EOF |
| 58 |
| 59 |
| 60 :PYTHON_FAIL |
| 61 echo Failed to checkout python automatically. |
| 62 echo Please visit http://python.org to download the latest python 2.x client bef
ore |
| 63 echo continuing. |
| 64 echo You can also get the "prebacked" version used at %ROOT_URL%/third_party/ |
| 65 goto :EOF |
OLD | NEW |