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

Side by Side Diff: chromite

Issue 6308007: WIP Chromite supporting "LEGACY" mode, as requested by Anush. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/chromite.git@master
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chromite.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/python
2 # Copyright (c) 2010 The Chromium OS 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 """Chromite"""
7
8 import ConfigParser
9 import optparse
10 import os
11 import sys
12
13 sys.path.append(os.path.join(os.path.dirname(__file__), '../lib'))
14 from cros_build_lib import Die
15 from cros_build_lib import RunCommand
16
17
18 def chromite_chroot(buildconfig):
19 pass
20
21
22 def chromite_build(buildconfig):
23 pass
24
25
26 def chromite_image(buildconfig):
27 pass
28
29
30 def main():
31 parser = optparse.OptionParser(usage='usage: %prog [options] build.spec')
32 parser.add_option('-s', '--spec', default=None,
33 help='Build Spec to build to')
34 parser.add_option('-o', '--output-dir', default='./build',
35 help='Output directory of build')
36 parser.add_option('-i', '--interactive', default=None,
37 help='Run in interactive build mode')
38 (options, inputs) = parser.parse_args()
39
40 if not options.spec:
41 parser.print_help()
42 Die('Build Spec required')
43 else:
44 print "Using build spec.." + options.spec
45
46 buildconfig = ConfigParser.SafeConfigParser()
47 buildconfig.read(options.spec)
48
49 for section in buildconfig.sections():
50 print section
51 for option in buildconfig.options(section):
52 print " ", option, "=", buildconfig.get(section, option)
53
54 chromite_chroot(buildconfig)
55 chromite_build(buildconfig)
56 chromite_image(buildconfig)
57
58 if __name__ == '__main__':
59 main()
OLDNEW
« no previous file with comments | « no previous file | chromite.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698