1@echo off 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 4:: found in the LICENSE file. 5setlocal 6 7:: Shall skip automatic update? 8IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :CALL_GCLIENT 9 10:: Synchronize the root directory before deferring control back to gclient.py. 11call "%~dp0update_depot_tools.bat" %* 12:: Abort the script if we failed to update depot_tools. 13IF %errorlevel% NEQ 0 ( 14 goto :EOF 15) 16 17:CALL_GCLIENT 18:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used 19:: standalone, but allow other PATH manipulations to take priority. 20set PATH=%PATH%;%~dp0 21 22:: Defer control. 23IF "%GCLIENT_PY3%" == "1" ( 24 :: Explicitly run on Python 3 25 call vpython3 "%~dp0gclient.py" %* 26) ELSE IF "%GCLIENT_PY3%" == "0" ( 27 :: Explicitly run on Python 2 28 call vpython "%~dp0gclient.py" %* 29) ELSE ( 30 :: Run on Python 3, allows default to be flipped. 31 call vpython3 "%~dp0gclient.py" %* 32) 33