- if version:
- sh.call("git", "reset", "--hard", app)
- # this command's stdin should be hooked up to ours
- try:
- configure_args = args[2:] + command.makeBaseArgs(options)
- sh.call("wizard", "configure", *configure_args, interactive=True)
- except shell.PythonCallError:
- sys.exit(1)
+ if not old_options.retry and version and version != "head-scripts": # for ease in testing
+ shell.call("git", "reset", "-q", "--hard", appstr)
+ input.infobox("Installing...")
+ application.install(distutils.version.LooseVersion(version), options)
+ if not old_options.no_commit:
+ git.commit_configure()
+ if not hasattr(options, "web_inferred"):
+ open(os.path.join(dir, ".scripts/url"), "w").write("http://%s%s" % (options.web_host, options.web_path)) # XXX: no support for https yet!
+ input.infobox("Congratulations, your new install is now accessible at:\n\nhttp://%s%s" % (options.web_host, options.web_path), width=80)
+
+def configure_parser(parser, baton):
+ parser.add_option("--prompt", dest="prompt", action="store_true",
+ default=False, help="Force to use non-ncurses interactive interface")
+ parser.add_option("--non-interactive", dest="non_interactive", action="store_true",
+ default=False, help="Force program to be non-interactive and use SETUPARGS. Use --help with APP to find argument names.")
+ parser.add_option("--no-commit", dest="no_commit", action="store_true",
+ default=command.boolish(os.getenv("WIZARD_NO_COMMIT")), help="Do not generate an 'installation commit' after configuring the application. Envvar is WIZARD_NO_COMMIT")
+ parser.add_option("--retry", dest="retry", action="store_true",
+ default=False, help="Do not complain if directory already exists and reinstall application.")
+ baton.push(parser, "srv_path")