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

Unified Diff: tools/patch_sdk.py

Issue 2464833002: Fix Debian builder. (Closed)
Patch Set: Created 4 years, 1 month 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 | « runtime/vm/vm.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/patch_sdk.py
diff --git a/tools/patch_sdk.py b/tools/patch_sdk.py
index bfc832733204232aae2d8a082ee2b28e49ad5b32..faa2bd03cf55e10961e59641b7677a9f1fdb6f13 100755
--- a/tools/patch_sdk.py
+++ b/tools/patch_sdk.py
@@ -3,15 +3,29 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
+import argparse
import os
import subprocess
import sys
import utils
+usage = """patch_sdk.py [options]"""
+
+def BuildArguments():
+ result = argparse.ArgumentParser(usage=usage)
+ result.add_argument("--dart-executable", help="dart executable", default=None)
+ return result
+
def main():
- dart = os.path.join(utils.CheckedInSdkPath(), 'bin', 'dart')
+ # Parse the options.
+ parser = BuildArguments()
+ (options, args) = parser.parse_known_args()
+ if options.dart_executable is not None:
+ options.dart_executable = os.path.abspath(options.dart_executable)
+ else:
+ options.dart_executable = os.path.join(utils.CheckedInSdkPath(), 'bin', 'dart')
dart_file = os.path.join(os.path.dirname(__file__), 'patch_sdk.dart')
- subprocess.check_call([dart, dart_file] + sys.argv[1:]);
+ subprocess.check_call([options.dart_executable, dart_file] + args);
if __name__ == '__main__':
main()
« no previous file with comments | « runtime/vm/vm.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698