changeset 2:d5c80480b967

adding script to checkout source packages; should make this more unified in the future
author k0s <k0scist@gmail.com>
date Tue, 02 Mar 2010 15:13:57 -0500
parents a11f1a148af0
children f207357d7ca9 1fa9ca23d696
files buttercup/checkout.py
diffstat 1 files changed, 46 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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()