Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(610)

Unified Diff: win_toolchain/get_toolchain_if_necessary.py

Issue 1284723006: Add a --force flag to get_toolchain_if_necessary.py to let it run on non-Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: win_toolchain/get_toolchain_if_necessary.py
diff --git a/win_toolchain/get_toolchain_if_necessary.py b/win_toolchain/get_toolchain_if_necessary.py
index 7187bf491b71fb7860715737d4dac64bfd2b8439..c38785d1732e1eef7c8ff65f4095b545730effe2 100755
--- a/win_toolchain/get_toolchain_if_necessary.py
+++ b/win_toolchain/get_toolchain_if_necessary.py
@@ -213,14 +213,16 @@ def DoTreeMirror(target_dir, tree_sha1):
def main():
- if not sys.platform.startswith(('cygwin', 'win32')):
- return 0
-
parser = optparse.OptionParser(description=sys.modules[__name__].__doc__)
parser.add_option('--output-json', metavar='FILE',
help='write information about toolchain to FILE')
+ parser.add_option('--force', action='store_true',
+ help='force script to run on non-Windows hosts')
options, args = parser.parse_args()
+ if not (sys.platform.startswith(('cygwin', 'win32')) or options.force):
+ return 0
+
if sys.platform == 'cygwin':
# This script requires Windows Python, so invoke with depot_tools' Python.
def winpath(path):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698