105 parser = argparse.ArgumentParser(description=__doc__)
106 parser.add_argument('--input', help='Path to original package_config', required=True)
107 parser.add_argument('--output', help='Path to the updated package_config', required=True)
108 parser.add_argument('--root', help='Path to fuchsia root', required=True)
109 parser.add_argument('--depfile', help='Path to the depfile', required=True)
110 args = parser.parse_args()
111
112 with open(args.input, 'r') as input_file:
113 contents = json.load(input_file)
114
115 output_dir = os.path.dirname(os.path.abspath(args.output))
117 if packages is None:
118 return 1
119
120 with open(args.depfile, 'w') as depfile:
121 depfile.write(
'%s: %s' % (args.output,
' '.
join(pubspec_paths)))
122
123 with open(args.output, 'w') as output_file:
124 package_config = PackageConfig(packages)
125 json.dump(
126 package_config.asdict(), output_file, indent=2, sort_keys=True, separators=(',', ': ')
127 )
128
129 return 0
130
131
static SkString join(const CommandLineFlags::StringArray &)