Mercurial > hg > buttercup
comparison buttercup/checkout.py @ 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 | |
children | e6e80bf0476f |
comparison
equal
deleted
inserted
replaced
1:a11f1a148af0 | 2:d5c80480b967 |
---|---|
1 #!/usr/bin/env python | |
2 | |
3 """ | |
4 checks out the source as associated with the buttercup package | |
5 """ | |
6 | |
7 import sys | |
8 import subprocess | |
9 from optparse import OptionParser | |
10 | |
11 HG='http://k0s.org/hg' | |
12 PACKAGES=['bitsyauth', | |
13 'bitsyblog', | |
14 'buttercup', | |
15 'clwapp', | |
16 'commentator', | |
17 'contenttransformer', | |
18 'cropresize', | |
19 'decoupage', | |
20 'emaildispatcher', | |
21 'genshi_view', | |
22 'hgpaste', | |
23 'lxmlmiddleware', | |
24 'montage', | |
25 'webob_view', | |
26 'wordstream'] | |
27 | |
28 def main(args=sys.argv[1:]): | |
29 parser = OptionParser() | |
30 parser.add_option('--list', action="store_true", default=False, | |
31 help="list the source to be installed") | |
32 options, args = parser.parse_args(args) | |
33 | |
34 sources = ['%s/%s' % (HG, package) | |
35 for package in PACKAGES ] | |
36 | |
37 if options.list: | |
38 for source in sources: | |
39 print source | |
40 sys.exit(0) | |
41 | |
42 for source in sources: | |
43 subprocess.call(['hg', 'clone', source]) | |
44 | |
45 if __name__ == '__main__': | |
46 main() |