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

Unified Diff: tools/grit/grit/format/repack.py

Issue 1410853008: Move grit from DEPS into src. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: webview licenses Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/grit/grit/format/rc_unittest.py ('k') | tools/grit/grit/format/resource_map.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/grit/grit/format/repack.py
diff --git a/tools/grit/grit/format/repack.py b/tools/grit/grit/format/repack.py
new file mode 100755
index 0000000000000000000000000000000000000000..337b7af20b5af3c53c465bcf07dc82385b388d2d
--- /dev/null
+++ b/tools/grit/grit/format/repack.py
@@ -0,0 +1,37 @@
+#!/usr/bin/env python
+# Copyright (c) 2012 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.
+
+"""
+A simple utility function to merge data pack files into a single data pack. See
+http://dev.chromium.org/developers/design-documents/linuxresourcesandlocalizedstrings
+for details about the file format.
+"""
+
+import optparse
+import os
+import sys
+
+if __name__ == '__main__':
+ sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))
+
+import grit.format.data_pack
+
+
+def main(argv):
+ parser = optparse.OptionParser('usage: %prog [options] <output_filename>'
+ '<input_file1> [input_file2] ...')
+ parser.add_option('--whitelist', action='store', dest='whitelist',
+ default=None, help='Full path to the whitelist used to'
+ 'filter output pak file resource IDs')
+ options, file_paths = parser.parse_args(argv)
+
+ if len(file_paths) < 2:
+ parser.error('Please specify output and at least one input filenames')
+
+ grit.format.data_pack.RePack(file_paths[0], file_paths[1:],
+ whitelist_file=options.whitelist)
+
+if '__main__' == __name__:
+ main(sys.argv[1:])
« no previous file with comments | « tools/grit/grit/format/rc_unittest.py ('k') | tools/grit/grit/format/resource_map.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698