OLD | NEW |
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 29 matching lines...) Expand all Loading... |
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
" | 41 if exist "%WIN_TOOLS_ROOT_DIR%\svn_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\svn_bin
" |
42 :: Will create svn_bin\... | 42 :: Will create svn_bin\... |
43 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
%" |
44 if errorlevel 1 goto :SVN_FAIL | 44 if errorlevel 1 goto :SVN_FAIL |
45 if not exist "%WIN_TOOLS_ROOT_DIR%\svn_bin\." goto :SVN_FAIL | 45 if not exist "%WIN_TOOLS_ROOT_DIR%\svn_bin\." goto :SVN_FAIL |
46 del "%~dp0svn.zip" | 46 del "%~dp0svn.zip" |
47 :: Create the batch file. | 47 :: Create the batch file. |
48 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 "%~dp0svnversion.new.bat" "%WIN_TOOLS_ROOT_DIR%\svnversion.bat" 1>n
ul | 49 call copy /y "%~dp0svnversion.new.bat" "%WIN_TOOLS_ROOT_DIR%\svnversion.bat" 1>n
ul |
50 call copy /y "%~dp0svn.new" "%WIN_TOOLS_ROOT_DIR%\svn" 1>nul | |
51 goto :PYTHON_CHECK | 50 goto :PYTHON_CHECK |
52 | 51 |
53 | 52 |
54 :SVN_FAIL | 53 :SVN_FAIL |
55 echo ... Failed to checkout svn automatically. | 54 echo ... Failed to checkout svn automatically. |
56 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 |
57 echo before continuing. | 56 echo before continuing. |
58 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/ |
59 set ERRORLEVEL=1 | 58 set ERRORLEVEL=1 |
60 goto :END | 59 goto :END |
(...skipping 13 matching lines...) Expand all Loading... |
74 | 73 |
75 | 74 |
76 :PYTHON_INSTALL | 75 :PYTHON_INSTALL |
77 echo Installing python ... | 76 echo Installing python ... |
78 :: Cleanup python directory if it was existing. | 77 :: Cleanup python directory if it was existing. |
79 if exist "%WIN_TOOLS_ROOT_DIR%\python_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\pyth
on_bin" | 78 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_26 "%WIN_TOOLS_ROOT_DIR%\
python_bin" | 79 call svn co -q %WIN_TOOLS_ROOT_URL%/third_party/python_26 "%WIN_TOOLS_ROOT_DIR%\
python_bin" |
81 if errorlevel 1 goto :PYTHON_FAIL | 80 if errorlevel 1 goto :PYTHON_FAIL |
82 :: Create the batch file. | 81 :: Create the batch file. |
83 call copy /y "%~dp0python.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul | 82 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 | |
85 set ERRORLEVEL=0 | 83 set ERRORLEVEL=0 |
86 goto :END | 84 goto :END |
87 | 85 |
88 | 86 |
89 :PYTHON_FAIL | 87 :PYTHON_FAIL |
90 echo ... Failed to checkout python automatically. | 88 echo ... Failed to checkout python automatically. |
91 echo Please visit http://python.org to download the latest python 2.x client bef
ore | 89 echo Please visit http://python.org to download the latest python 2.x client bef
ore |
92 echo continuing. | 90 echo continuing. |
93 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third
_party/ | 91 echo You can also get the "prebacked" version used at %WIN_TOOLS_ROOT_URL%/third
_party/ |
94 set ERRORLEVEL=1 | 92 set ERRORLEVEL=1 |
95 goto :END | 93 goto :END |
96 | 94 |
97 | 95 |
98 :returncode | 96 :returncode |
99 set WIN_TOOLS_ROOT_URL= | 97 set WIN_TOOLS_ROOT_URL= |
100 set WIN_TOOLS_ROOT_DIR= | 98 set WIN_TOOLS_ROOT_DIR= |
101 exit /b %ERRORLEVEL% | 99 exit /b %ERRORLEVEL% |
102 | 100 |
103 :END | 101 :END |
104 call :returncode %ERRORLEVEL% | 102 call :returncode %ERRORLEVEL% |
OLD | NEW |