- appname, _, version = options.app.partition('-')
- app = deploy.applications()[appname]
- sh = shell.Shell()
- sh.call("git", "clone", "--shared", app.repository, dir)
+
+ appname, _, version = appstr.partition('-')
+ application = app.applications()[appname]
+
+ # get configuration
+ schema = application.install_schema
+ schema.commit(application, dir)
+ options = None
+ opthandler = installopt.Controller(dir, schema)
+ parser = command.WizardOptionParser("""usage: %%prog install %s DIR [ -- SETUPARGS ]
+
+Autoinstalls the application %s in the directory DIR.""" % (appname, appname))
+ configure_parser(parser, baton)
+ opthandler.push(parser)
+ if old_options.help:
+ parser.print_help()
+ sys.exit(1)
+ ihandler = interactive.Controller(dir, schema, input)
+ options, _ = parser.parse_all(args[2:] + command.make_base_args(old_options))
+ if old_options.non_interactive:
+ opthandler.handle(options)
+ else:
+ ihandler.ask(options)
+
+ input.infobox("Copying files (this may take a while)...")
+ if not os.path.exists(dir):
+ shell.call("git", "clone", "-q", "--shared", application.repository(old_options.srv_path), dir)