| OLD | NEW |
| 1 @echo off | 1 @echo off |
| 2 :: Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 :: Copyright (c) 2012 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 cscript //nologo //e:jscript "%~dp0get_file.js" %GIT_FETCH_URL% "%GIT_DOWNLOAD_P
ATH%" | 107 cscript //nologo //e:jscript "%~dp0get_file.js" %GIT_FETCH_URL% "%GIT_DOWNLOAD_P
ATH%" |
| 108 if errorlevel 1 goto :GIT_FAIL | 108 if errorlevel 1 goto :GIT_FAIL |
| 109 :: Cleanup git directory if it already exists. | 109 :: Cleanup git directory if it already exists. |
| 110 if exist "%GIT_INST_DIR%\." rd /q /s "%GIT_INST_DIR%" | 110 if exist "%GIT_INST_DIR%\." rd /q /s "%GIT_INST_DIR%" |
| 111 | 111 |
| 112 :: run PortableGit self-extractor | 112 :: run PortableGit self-extractor |
| 113 :: -y : Be Quiet ("yes") | 113 :: -y : Be Quiet ("yes") |
| 114 :: -sd1 : Self delete SFX archive | 114 :: -sd1 : Self delete SFX archive |
| 115 :: -InstallPath : Where to put the files | 115 :: -InstallPath : Where to put the files |
| 116 :: -Directory : Run the post-extract program with this current-working-directory | 116 :: -Directory : Run the post-extract program with this current-working-directory |
| 117 call "%GIT_DOWNLOAD_PATH%" -y -sd1 -InstallPath="%GIT_INST_DIR%" -Directory="%GI
T_INST_DIR%" | 117 :: |
| 118 :: Path slashes must be escaped or the 7zip sfx treats e.g. path\to\dir as |
| 119 :: path[tab]o\dir. |
| 120 set GIT_INST_DIR_ESC=%GIT_INST_DIR:\=\\% |
| 121 call "%GIT_DOWNLOAD_PATH%" -y -sd1 -InstallPath="%GIT_INST_DIR_ESC%" -Directory=
"%GIT_INST_DIR_ESC%" |
| 118 if errorlevel 1 goto :GIT_FAIL | 122 if errorlevel 1 goto :GIT_FAIL |
| 119 | 123 |
| 120 del "%GIT_DOWNLOAD_PATH%" | 124 del "%GIT_DOWNLOAD_PATH%" |
| 121 if not exist "%GIT_INST_DIR%\." goto :GIT_FAIL | 125 if not exist "%GIT_INST_DIR%\." goto :GIT_FAIL |
| 122 | 126 |
| 123 :GIT_MAKE_BATCH_FILES | 127 :GIT_MAKE_BATCH_FILES |
| 124 :: Create the batch files. | 128 :: Create the batch files. |
| 125 set GIT_TEMPL=%~dp0git.template.bat | 129 set GIT_TEMPL=%~dp0git.template.bat |
| 126 set SED=%GIT_INST_DIR%\usr\bin\sed.exe | 130 set SED=%GIT_INST_DIR%\usr\bin\sed.exe |
| 127 call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/cmd\\\\git.exe/
" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\git.bat" | 131 call "%SED%" -e "s/GIT_BIN_DIR/%GIT_BIN_DIR%/" -e "s/GIT_PROGRAM/cmd\\\\git.exe/
" < %GIT_TEMPL% > "%WIN_TOOLS_ROOT_DIR%\git.bat" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 goto :END | 196 goto :END |
| 193 | 197 |
| 194 | 198 |
| 195 :returncode | 199 :returncode |
| 196 set WIN_TOOLS_ROOT_URL= | 200 set WIN_TOOLS_ROOT_URL= |
| 197 set WIN_TOOLS_ROOT_DIR= | 201 set WIN_TOOLS_ROOT_DIR= |
| 198 exit /b %ERRORLEVEL% | 202 exit /b %ERRORLEVEL% |
| 199 | 203 |
| 200 :END | 204 :END |
| 201 call :returncode %ERRORLEVEL% | 205 call :returncode %ERRORLEVEL% |
| OLD | NEW |