# HG changeset patch # User Bernhard Herzog # Date 1226691681 0 # Node ID 63f73bb9c4590fc1e30b420f7b235a29cb396528 # Parent cbcd8f549ff7a8f82d5b0d3dc5936175f4b7b440 Add build command to bin/treepkgbuilder.py diff -r cbcd8f549ff7 -r 63f73bb9c459 bin/treepkgbuilder.py --- 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")