changeset 210:63f73bb9c459

Add build command to bin/treepkgbuilder.py
author Bernhard Herzog <bh@intevation.de>
date Fri, 14 Nov 2008 19:41:21 +0000
parents cbcd8f549ff7
children 56aa89c588a1
files bin/treepkgbuilder.py
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bin/treepkgbuilder.py	Fri Nov 14 19:41:03 2008 +0000
+++ b/bin/treepkgbuilder.py	Fri Nov 14 19:41:21 2008 +0000
@@ -128,6 +128,26 @@
         self.get_builder().login()
 
 
+class BuildCommand(Command):
+
+    names = ("build",)
+
+    def create_parser(self):
+        parser = super(BuildCommand, self).create_parser()
+        parser.add_option("--logfile", help=("The file for the build log."))
+        parser.add_option("--binary-dir",
+                          help=("Directory for the binary packages."))
+        return parser
+
+    def run(self):
+        if len(self.rest) != 1:
+            print >>sys.stderr, "Exactly one .dsc file must be specified"
+            sys.exit(1)
+        dsc_file = self.rest[0]
+        self.get_builder().build(dsc_file, binary_dir=self.opts.binary_dir,
+                                 logfile=self.opts.logfile)
+
+
 class HelpCommand(Command):
 
     names = ("help", "--help", "-h")
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)