Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: mojo/public/tools/dartx.py

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/public/tools/dart_snapshotter.py ('k') | mojo/public/tools/download_dart_snapshotter.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 """Creates a dartx archive.
7 """
8
9 import argparse
10 import os
11 import sys
12 import zipfile
13
14 def main():
15 parser = argparse.ArgumentParser(description='dartx packager.')
16 parser.add_argument('--snapshot',
17 help='Snapshot file.',
18 type=str)
19 parser.add_argument('--output',
20 help='Path to output archive.',
21 type=str)
22 arguments = parser.parse_args()
23
24 snapshot = arguments.snapshot
25 output = arguments.output
26
27 with zipfile.ZipFile(output, 'w', zipfile.ZIP_DEFLATED) as outfile:
28 outfile.write(snapshot, 'snapshot_blob.bin')
29
30 return 0
31
32 if __name__ == '__main__':
33 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/public/tools/dart_snapshotter.py ('k') | mojo/public/tools/download_dart_snapshotter.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698