]> scripts.mit.edu Git - wizard.git/blob - wizard/command/configure.py
Implement 'wizard install', with other improvements.
[wizard.git] / wizard / command / configure.py
1 import logging
2 import sys
3
4 from wizard import command, deploy, git
5
6 def main(argv, baton):
7     # SKETCHY!
8     tag = git.describe()
9     application, _, version = tag.partition('-')
10     app = deploy.applications()[application]
11     handler = app.install_handler
12
13     usage = """usage: %prog configure [ARGS]
14
15 Takes an already cloned working copy and configures the
16 application.  Options change depending on the current
17 working directory."""
18
19     parser = command.WizardOptionParser(usage)
20     handler.push(parser)
21     options, args = parser.parse_all(argv)
22     handler.handle(options)
23
24     app.install(options)
25