blob: dcb7f9a1084d10cdf94ced0f6650576cb946fc7c [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
Ryan Cui0af7a912012-06-19 01:00:4710import optparse
11
Gilad Arnoldabb352e2012-09-23 08:24:2712import builder
13
Ryan Cui0af7a912012-06-19 01:00:4714
15def main():
16 parser = optparse.OptionParser(usage='usage: %prog [options] package')
17 parser.add_option('--board', type='string', action='store',
18 help=('The board that the package being processed belongs '
19 'to.'))
20 parser.add_option('--deep', action='store_true', default=False,
21 help=('Also strip dependencies of package.'))
22
23 (options, args) = parser.parse_args()
24 if len(args) != 1:
25 parser.print_help()
26 parser.error('Need exactly one package name')
27
28 if not options.board:
29 parser.error('Need to specify --board')
30
31 builder.UpdateGmergeBinhost(options.board, args[0], options.deep)
32
33
34if __name__ == '__main__':
35 main()