Commit 4d3ed59a authored by maruel@chromium.org's avatar maruel@chromium.org

Redo the python check to look for the directories too.

This way, DEPOT_TOOLS_PYTHON_275=1 will properly upgrade an installation
still running 2.6. Otherwise the user had to "del python.bat" to force
the upgrade.

Stop calling python to verify it works, this is slow.

Upgrade url to https.

R=iannucci@chromium.org
BUG=241769

Review URL: https://codereview.chromium.org/26901003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@228179 0039d316-1c4b-4281-b951-d872f2087c98
parent c2f94e78
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
:: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly :: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly
:: returned. :: returned.
set WIN_TOOLS_ROOT_URL=http://src.chromium.org/svn/trunk/tools set WIN_TOOLS_ROOT_URL=https://src.chromium.org/svn/trunk/tools
set GIT_BIN_DIR=git-1.8.0_bin set GIT_BIN_DIR=git-1.8.0_bin
:: Get absolute root directory (.js scripts don't handle relative paths well). :: Get absolute root directory (.js scripts don't handle relative paths well).
...@@ -113,21 +113,22 @@ goto :END ...@@ -113,21 +113,22 @@ goto :END
:PYTHON_CHECK :PYTHON_CHECK
:: If the batch file exists, skip the python check. if "%DEPOT_TOOLS_PYTHON_275%" == "1" goto :PY275_CHECK
set ERRORLEVEL=0 goto :PY26_CHECK
if exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :END
if "%WIN_TOOLS_FORCE%" == "1" goto :PYTHON_INSTALL
call python --version 2>nul 1>nul
if errorlevel 1 goto :PYTHON_INSTALL
:: We are done. :PY26_CHECK
if not exist "%WIN_TOOLS_ROOT_DIR%\python_bin" goto :PY26_INSTALL
if not exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :PY26_INSTALL
set ERRORLEVEL=0 set ERRORLEVEL=0
goto :END goto :END
:PYTHON_INSTALL :PY275_CHECK
if "%DEPOT_TOOLS_PYTHON_275%" == "1" goto :PY275_INSTALL if not exist "%WIN_TOOLS_ROOT_DIR%\python275_bin" goto :PY275_INSTALL
goto :PY26_INSTALL if not exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :PY275_INSTALL
set ERRORLEVEL=0
goto :END
:PY275_INSTALL :PY275_INSTALL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment