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

Unified Diff: chromite/chromite

Issue 3369009: Sample chromite spec (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Updated to use SafeConfigParser Created 10 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromite/specs/x86-generic.spec » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromite/chromite
diff --git a/chromite/chromite b/chromite/chromite
new file mode 100755
index 0000000000000000000000000000000000000000..0823dda3b878d0a0ce2adc407d3be0e87e951da4
--- /dev/null
+++ b/chromite/chromite
@@ -0,0 +1,59 @@
+#!/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()
« no previous file with comments | « no previous file | chromite/specs/x86-generic.spec » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698