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='Sky Packager') |
| 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('-C', type=str, |
| 18 help='Switch to this directory before running executable') |
| 19 args = parser.parse_args() |
| 20 return subprocess.check_call([ |
| 21 args.executable, |
| 22 args.main, |
| 23 '--package-root=%s' % args.package_root, |
| 24 '--snapshot=%s' % args.snapshot, |
| 25 ], cwd=args.C) |
| 26 |
| 27 if __name__ == '__main__': |
| 28 sys.exit(main()) |
OLD | NEW |