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

Side by Side Diff: bootstrap/win/win_tools.bat

Issue 125032: Add scripts to thunk into the non-cygwin version of svn and python.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 11 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « bootstrap/win/svn.new.bat ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 @echo off 1 @echo off
2 :: Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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 script will try to find if svn and python are accessible and it not, 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. 7 :: it will try to download it and 'install' it in depot_tools.
8 8
9 :: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly 9 :: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly
10 :: returned. 10 :: returned.
(...skipping 16 matching lines...) Expand all
27 if "%WIN_TOOLS_FORCE%" == "1" goto :SVN_INSTALL 27 if "%WIN_TOOLS_FORCE%" == "1" goto :SVN_INSTALL
28 call svn --version 2>nul 1>nul 28 call svn --version 2>nul 1>nul
29 if errorlevel 1 goto :SVN_INSTALL 29 if errorlevel 1 goto :SVN_INSTALL
30 goto :PYTHON_CHECK 30 goto :PYTHON_CHECK
31 31
32 32
33 :SVN_INSTALL 33 :SVN_INSTALL
34 echo Installing subversion ... 34 echo Installing subversion ...
35 :: svn is not accessible; check it out and create 'proxy' files. 35 :: svn is not accessible; check it out and create 'proxy' files.
36 if exist "%~dp0svn.7z" del "%~dp0svn.7z" 36 if exist "%~dp0svn.7z" del "%~dp0svn.7z"
37 cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party /svn_win_client.zip "%~dp0svn.zip" 37 cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party /svn_bin.zip "%~dp0svn.zip"
38 if errorlevel 1 goto :SVN_FAIL 38 if errorlevel 1 goto :SVN_FAIL
39 :: Cleanup svn directory if it was existing. 39 :: Cleanup svn directory if it was existing.
40 if exist "%WIN_TOOLS_ROOT_DIR%\svn\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\svn" 40 if exist "%WIN_TOOLS_ROOT_DIR%\svn\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\svn"
41 if exist "%WIN_TOOLS_ROOT_DIR%\svn_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\svn_bin "
42 :: Will create svn_bin\...
41 cscript //nologo //e:jscript "%~dp0unzip.js" "%~dp0svn.zip" "%WIN_TOOLS_ROOT_DIR %" 43 cscript //nologo //e:jscript "%~dp0unzip.js" "%~dp0svn.zip" "%WIN_TOOLS_ROOT_DIR %"
42 if errorlevel 1 goto :SVN_FAIL 44 if errorlevel 1 goto :SVN_FAIL
43 if not exist "%WIN_TOOLS_ROOT_DIR%\svn\." goto :SVN_FAIL 45 if not exist "%WIN_TOOLS_ROOT_DIR%\svn_bin\." goto :SVN_FAIL
44 del "%~dp0svn.zip" 46 del "%~dp0svn.zip"
45 :: Create the batch file. 47 :: Create the batch file.
46 call copy /y "%~dp0svn.new.bat" "%WIN_TOOLS_ROOT_DIR%\svn.bat" 1>nul 48 call copy /y "%~dp0svn.new.bat" "%WIN_TOOLS_ROOT_DIR%\svn.bat" 1>nul
49 call copy /y "%~dp0svn.new" "%WIN_TOOLS_ROOT_DIR%\svn" 1>nul
47 goto :PYTHON_CHECK 50 goto :PYTHON_CHECK
48 51
49 52
50 :SVN_FAIL 53 :SVN_FAIL
51 echo ... Failed to checkout svn automatically. 54 echo ... Failed to checkout svn automatically.
52 echo Please visit http://subversion.tigris.org to download the latest subversion client 55 echo Please visit http://subversion.tigris.org to download the latest subversion client
53 echo before continuing. 56 echo before continuing.
54 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third _party/ 57 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third _party/
55 set ERRORLEVEL=1 58 set ERRORLEVEL=1
56 goto :END 59 goto :END
57 60
58 61
59 :PYTHON_CHECK 62 :PYTHON_CHECK
60 :: If the batch file exists, skip the python check. 63 :: If the batch file exists, skip the python check.
61 set ERRORLEVEL=0 64 set ERRORLEVEL=0
62 if exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :END 65 if exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :END
63 if "%WIN_TOOLS_FORCE%" == "1" goto :PYTHON_INSTALL 66 if "%WIN_TOOLS_FORCE%" == "1" goto :PYTHON_INSTALL
64 call python --version 2>nul 1>nul 67 call python --version 2>nul 1>nul
65 if errorlevel 1 goto :PYTHON_INSTALL 68 if errorlevel 1 goto :PYTHON_INSTALL
66 69
67 :: We are done. 70 :: We are done.
68 set ERRORLEVEL=0 71 set ERRORLEVEL=0
69 goto :END 72 goto :END
70 73
71 74
72 :PYTHON_INSTALL 75 :PYTHON_INSTALL
73 echo Installing python ... 76 echo Installing python ...
74 :: Cleanup python directory if it was existing. 77 :: Cleanup python directory if it was existing.
75 if exist "%WIN_TOOLS_ROOT_DIR%\python\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\python" 78 if exist "%WIN_TOOLS_ROOT_DIR%\python\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\python"
76 call svn co -q %WIN_TOOLS_ROOT_URL%/third_party/python "%WIN_TOOLS_ROOT_DIR%\pyt hon" 79 if exist "%WIN_TOOLS_ROOT_DIR%\python_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\pyth on_bin"
80 call svn co -q %WIN_TOOLS_ROOT_URL%/third_party/python "%WIN_TOOLS_ROOT_DIR%\pyt hon_bin"
77 if errorlevel 1 goto :PYTHON_FAIL 81 if errorlevel 1 goto :PYTHON_FAIL
78 :: Create the batch file. 82 :: Create the batch file.
79 call copy /y "%~dp0python.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul 83 call copy /y "%~dp0python.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul
84 call copy /y "%~dp0python.new" "%WIN_TOOLS_ROOT_DIR%\python" 1>nul
80 set ERRORLEVEL=0 85 set ERRORLEVEL=0
81 goto :END 86 goto :END
82 87
83 88
84 :PYTHON_FAIL 89 :PYTHON_FAIL
85 echo ... Failed to checkout python automatically. 90 echo ... Failed to checkout python automatically.
86 echo Please visit http://python.org to download the latest python 2.x client bef ore 91 echo Please visit http://python.org to download the latest python 2.x client bef ore
87 echo continuing. 92 echo continuing.
88 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third _party/ 93 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third _party/
89 set ERRORLEVEL=1 94 set ERRORLEVEL=1
90 goto :END 95 goto :END
91 96
92 97
93 :returncode 98 :returncode
94 set WIN_TOOLS_ROOT_URL= 99 set WIN_TOOLS_ROOT_URL=
95 set WIN_TOOLS_ROOT_DIR= 100 set WIN_TOOLS_ROOT_DIR=
96 exit /b %ERRORLEVEL% 101 exit /b %ERRORLEVEL%
97 102
98 :END 103 :END
99 call :returncode %ERRORLEVEL% 104 call :returncode %ERRORLEVEL%
OLDNEW
« no previous file with comments | « bootstrap/win/svn.new.bat ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698