diff --git a/apply_issue.bat b/apply_issue.bat index 2a035062b3..30bc306bcf 100755 --- a/apply_issue.bat +++ b/apply_issue.bat @@ -4,5 +4,9 @@ :: found in the LICENSE file. setlocal +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -%~dp0python "%~dp0\apply_issue.py" %* +python "%~dp0\apply_issue.py" %* diff --git a/cit.bat b/cit.bat index 8f79044aaf..82919b936d 100755 --- a/cit.bat +++ b/cit.bat @@ -1,8 +1,12 @@ -@echo off -:: Copyright (c) 2015 The Chromium Authors. All rights reserved. -:: Use of this source code is governed by a BSD-style license that can be -:: found in the LICENSE file. -setlocal - -:: Defer control. -%~dp0python "%~dp0\cit.py" %* +@echo off +:: Copyright (c) 2015 The Chromium Authors. All rights reserved. +:: Use of this source code is governed by a BSD-style license that can be +:: found in the LICENSE file. +setlocal + +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + +:: Defer control. +python "%~dp0\cit.py" %* diff --git a/clang-format.bat b/clang-format.bat index 884cd246a3..c3bb53bc44 100644 --- a/clang-format.bat +++ b/clang-format.bat @@ -4,5 +4,9 @@ :: found in the LICENSE file. setlocal +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -%~dp0python "%~dp0\clang_format.py" %* +python "%~dp0\clang_format.py" %* diff --git a/clang_format_merge_driver.bat b/clang_format_merge_driver.bat index 6f15dd749c..8e614b492d 100755 --- a/clang_format_merge_driver.bat +++ b/clang_format_merge_driver.bat @@ -1,8 +1,12 @@ -@echo off -:: Copyright 2016 The Chromium Authors. All rights reserved. -:: Use of this source code is governed by a BSD-style license that can be -:: found in the LICENSE file. -setlocal - -:: Defer control. -%~dp0python "%~dp0\clang_format_merge_driver.py" %* +@echo off +:: Copyright 2016 The Chromium Authors. All rights reserved. +:: Use of this source code is governed by a BSD-style license that can be +:: found in the LICENSE file. +setlocal + +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + +:: Defer control. +python "%~dp0\clang_format_merge_driver.py" %* diff --git a/commit_queue.bat b/commit_queue.bat index c1babf04cf..44639a64d8 100755 --- a/commit_queue.bat +++ b/commit_queue.bat @@ -4,5 +4,9 @@ :: found in the LICENSE file. setlocal +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -%~dp0python "%~dp0\commit_queue.py" %* +python "%~dp0\commit_queue.py" %* diff --git a/cpplint.bat b/cpplint.bat index 914eecf1a7..4b916c086b 100644 --- a/cpplint.bat +++ b/cpplint.bat @@ -1,4 +1,11 @@ @echo off +:: Copyright 2016 The Chromium Authors. All rights reserved. +:: Use of this source code is governed by a BSD-style license that can be +:: found in the LICENSE file. setlocal -call python "%~dp0cpplint.py" %* +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + +python "%~dp0cpplint.py" %* diff --git a/depot-tools-auth.bat b/depot-tools-auth.bat index 4770ed6fb4..37280b765f 100644 --- a/depot-tools-auth.bat +++ b/depot-tools-auth.bat @@ -4,5 +4,9 @@ :: found in the LICENSE file. setlocal +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -%~dp0python "%~dp0\depot-tools-auth.py" %* +python "%~dp0\depot-tools-auth.py" %* diff --git a/download_from_google_storage.bat b/download_from_google_storage.bat index 4c7971b426..f1f2d21616 100755 --- a/download_from_google_storage.bat +++ b/download_from_google_storage.bat @@ -2,6 +2,11 @@ :: Copyright (c) 2012 The Chromium Authors. All rights reserved. :: Use of this source code is governed by a BSD-style license that can be :: found in the LICENSE file. +setlocal + +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 :: Defer control. -%~dp0python "%~dp0\download_from_google_storage.py" %* +python "%~dp0\download_from_google_storage.py" %* diff --git a/fetch.bat b/fetch.bat index d6ea944e26..5f8019a19d 100755 --- a/fetch.bat +++ b/fetch.bat @@ -7,5 +7,9 @@ setlocal :: Synchronize the root directory before deferring control back to gclient.py. call "%~dp0\update_depot_tools.bat" +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -%~dp0python "%~dp0\fetch.py" %* +python "%~dp0\fetch.py" %* diff --git a/gclient.bat b/gclient.bat index d66ce6a41a..5aaff866c5 100755 --- a/gclient.bat +++ b/gclient.bat @@ -7,5 +7,9 @@ setlocal :: Synchronize the root directory before deferring control back to gclient.py. call "%~dp0update_depot_tools.bat" %* +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -"%~dp0python" "%~dp0gclient.py" %* +python "%~dp0gclient.py" %* diff --git a/gn.bat b/gn.bat index 0a42a0766e..9eb6b56a1f 100644 --- a/gn.bat +++ b/gn.bat @@ -4,5 +4,9 @@ :: found in the LICENSE file. setlocal +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + :: Defer control. -%~dp0python "%~dp0\gn.py" %* +python "%~dp0\gn.py" %* diff --git a/roll-dep-svn.bat b/roll-dep-svn.bat index b2aec795e8..6ff5db78f1 100755 --- a/roll-dep-svn.bat +++ b/roll-dep-svn.bat @@ -1,7 +1,12 @@ -@echo off -:: Copyright (c) 2012 The Chromium Authors. All rights reserved. -:: Use of this source code is governed by a BSD-style license that can be -:: found in the LICENSE file. - -:: Defer control. -%~dp0python "%~dp0\roll_dep_svn.py" %* +@echo off +:: Copyright (c) 2012 The Chromium Authors. All rights reserved. +:: Use of this source code is governed by a BSD-style license that can be +:: found in the LICENSE file. +setlocal + +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 + +:: Defer control. +python "%~dp0\roll_dep_svn.py" %* diff --git a/roll-dep.bat b/roll-dep.bat index d5166dfa8b..c49c88dc51 100755 --- a/roll-dep.bat +++ b/roll-dep.bat @@ -2,6 +2,11 @@ :: Copyright (c) 2012 The Chromium Authors. All rights reserved. :: Use of this source code is governed by a BSD-style license that can be :: found in the LICENSE file. +setlocal + +:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used +:: standalone, but allow other PATH manipulations to take priority. +set PATH=%PATH%;%~dp0 :: Defer control. -%~dp0python "%~dp0\roll_dep.py" %* +python "%~dp0\roll_dep.py" %*