| # Copyright 2015 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| """This script outputs the package name specified in the pubspec.yaml""" |
| # TODO(johnmccutchan): Use the yaml package to parse. |
| assert line.startswith("name:") |
| return line.split(":")[1].strip() |
| source_file = open(pubspec_file, "r") |
| if line.startswith("name:"): |
| if __name__ == '__main__': |
| parser = argparse.ArgumentParser( |
| description="This script outputs the package name specified in the" |
| parser.add_argument("--pubspec", |
| metavar="<pubspec-file>", |
| help="Path to pubspec file") |
| args = parser.parse_args() |
| sys.exit(main(args.pubspec_file)) |