blob: 3d500e12bd24d1c32f643d787f8323ce29ed0e9e [file] [log] [blame]
Ryan Cui0af7a912012-06-19 01:00:471#!/usr/bin/python
2
3# Copyright (c) 2009-2012 The Chromium OS Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7"""Script that strips a given package and places the stripped version in
8 /build/<board>/stripped-packages."""
9
10import builder
11import optparse
12
13
14def main():
15 parser = optparse.OptionParser(usage='usage: %prog [options] package')
16 parser.add_option('--board', type='string', action='store',
17 help=('The board that the package being processed belongs '
18 'to.'))
19 parser.add_option('--deep', action='store_true', default=False,
20 help=('Also strip dependencies of package.'))
21
22 (options, args) = parser.parse_args()
23 if len(args) != 1:
24 parser.print_help()
25 parser.error('Need exactly one package name')
26
27 if not options.board:
28 parser.error('Need to specify --board')
29
30 builder.UpdateGmergeBinhost(options.board, args[0], options.deep)
31
32
33if __name__ == '__main__':
34 main()