| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/env python | |
| 2 # Copyright 2015 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. | |
| 5 | |
| 6 import argparse | |
| 7 import subprocess | |
| 8 import sys | |
| 9 import os | |
| 10 | |
| 11 def main(): | |
| 12 parser = argparse.ArgumentParser(description='Snapshots Mojo applications') | |
| 13 parser.add_argument('executable', type=str) | |
| 14 parser.add_argument('main', type=str) | |
| 15 parser.add_argument('--package-root', type=str) | |
| 16 parser.add_argument('--snapshot', type=str) | |
| 17 parser.add_argument('--depfile', type=str) | |
| 18 parser.add_argument('--build-output', type=str) | |
| 19 | |
| 20 args = parser.parse_args() | |
| 21 if not os.path.isfile(args.executable): | |
| 22 print "file not found: " + args.executable | |
| 23 return subprocess.check_call([ | |
| 24 args.executable, | |
| 25 args.main, | |
| 26 '--package-root=%s' % args.package_root, | |
| 27 '--snapshot=%s' % args.snapshot, | |
| 28 '--depfile=%s' % args.depfile, | |
| 29 '--build-output=%s' % args.build_output, | |
| 30 ]) | |
| 31 | |
| 32 if __name__ == '__main__': | |
| 33 sys.exit(main()) | |
| OLD | NEW |