mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-14 08:26:57 +02:00
Change-Id: I049b31c2fc7369fa58ca43e24c2015e574231d7f BUG= TEST=none Review URL: http://codereview.chromium.org/3369009
60 lines
1.5 KiB
Python
Executable File
60 lines
1.5 KiB
Python
Executable File
#!/usr/bin/python
|
|
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
"""Chromite"""
|
|
|
|
import ConfigParser
|
|
import optparse
|
|
import os
|
|
import sys
|
|
|
|
sys.path.append(os.path.join(os.path.dirname(__file__), '../lib'))
|
|
from cros_build_lib import Die
|
|
from cros_build_lib import RunCommand
|
|
|
|
|
|
def chromite_chroot(buildconfig):
|
|
pass
|
|
|
|
|
|
def chromite_build(buildconfig):
|
|
pass
|
|
|
|
|
|
def chromite_image(buildconfig):
|
|
pass
|
|
|
|
|
|
def main():
|
|
parser = optparse.OptionParser(usage='usage: %prog [options] build.spec')
|
|
parser.add_option('-s', '--spec', default=None,
|
|
help='Build Spec to build to')
|
|
parser.add_option('-o', '--output-dir', default='./build',
|
|
help='Output directory of build')
|
|
parser.add_option('-i', '--interactive', default=None,
|
|
help='Run in interactive build mode')
|
|
(options, inputs) = parser.parse_args()
|
|
|
|
if not options.spec:
|
|
parser.print_help()
|
|
Die('Build Spec required')
|
|
else:
|
|
print "Using build spec.." + options.spec
|
|
|
|
buildconfig = ConfigParser.SafeConfigParser()
|
|
buildconfig.read(options.spec)
|
|
|
|
for section in buildconfig.sections():
|
|
print section
|
|
for option in buildconfig.options(section):
|
|
print " ", option, "=", buildconfig.get(section, option)
|
|
|
|
chromite_chroot(buildconfig)
|
|
chromite_build(buildconfig)
|
|
chromite_image(buildconfig)
|
|
|
|
if __name__ == '__main__':
|
|
main()
|