OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 2 # Copyright 2016 The Dart project 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. |
| 5 |
| 6 # Usage: dart_for_gn.py path_to_dart_binary [arguments] |
| 7 # |
| 8 # We have gn set up so that actions can only run python scripts. |
| 9 # We use this wrapper script when we need an action to run the Dart VM |
| 10 # The first command line argument is mandatory and should be the absolute path |
| 11 # to the Dart VM binary. |
| 12 |
| 13 import subprocess |
| 14 import sys |
| 15 |
| 16 def main(argv): |
| 17 if len(argv) < 2: |
| 18 print "Requires path to Dart VM binary as first argument" |
| 19 return -1 |
| 20 command = argv[1:] |
| 21 return subprocess.call(command) |
| 22 |
| 23 if __name__ == '__main__': |
| 24 sys.exit(main(sys.argv)) |
OLD | NEW |