| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/env python | |
| 2 # Copyright (c) 2012 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 """ | |
| 7 A simple utility function to merge data pack files into a single data pack. See | |
| 8 http://dev.chromium.org/developers/design-documents/linuxresourcesandlocalizedst
rings | |
| 9 for details about the file format. | |
| 10 """ | |
| 11 | |
| 12 import optparse | |
| 13 import os | |
| 14 import sys | |
| 15 | |
| 16 if __name__ == '__main__': | |
| 17 sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) | |
| 18 | |
| 19 import grit.format.data_pack | |
| 20 | |
| 21 | |
| 22 def main(argv): | |
| 23 parser = optparse.OptionParser('usage: %prog [options] <output_filename>' | |
| 24 '<input_file1> [input_file2] ...') | |
| 25 parser.add_option('--whitelist', action='store', dest='whitelist', | |
| 26 default=None, help='Full path to the whitelist used to' | |
| 27 'filter output pak file resource IDs') | |
| 28 options, file_paths = parser.parse_args(argv) | |
| 29 | |
| 30 if len(file_paths) < 2: | |
| 31 parser.error('Please specify output and at least one input filenames') | |
| 32 | |
| 33 grit.format.data_pack.RePack(file_paths[0], file_paths[1:], | |
| 34 whitelist_file=options.whitelist) | |
| 35 | |
| 36 if '__main__' == __name__: | |
| 37 main(sys.argv[1:]) | |
| OLD | NEW |