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