# HG changeset patch # User k0s # Date 1267560837 18000 # Node ID d5c80480b96703d885647716119749d6c276961c # Parent a11f1a148af0326885cc6aa1e373af513bb82056 adding script to checkout source packages; should make this more unified in the future diff -r a11f1a148af0 -r d5c80480b967 buttercup/checkout.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buttercup/checkout.py Tue Mar 02 15:13:57 2010 -0500 @@ -0,0 +1,46 @@ +#!/usr/bin/env python + +""" +checks out the source as associated with the buttercup package +""" + +import sys +import subprocess +from optparse import OptionParser + +HG='http://k0s.org/hg' +PACKAGES=['bitsyauth', + 'bitsyblog', + 'buttercup', + 'clwapp', + 'commentator', + 'contenttransformer', + 'cropresize', + 'decoupage', + 'emaildispatcher', + 'genshi_view', + 'hgpaste', + 'lxmlmiddleware', + 'montage', + 'webob_view', + 'wordstream'] + +def main(args=sys.argv[1:]): + parser = OptionParser() + parser.add_option('--list', action="store_true", default=False, + help="list the source to be installed") + options, args = parser.parse_args(args) + + sources = ['%s/%s' % (HG, package) + for package in PACKAGES ] + + if options.list: + for source in sources: + print source + sys.exit(0) + + for source in sources: + subprocess.call(['hg', 'clone', source]) + +if __name__ == '__main__': + main()