4 from wizard import command, deploy
7 options, show = parse_args(argv, baton)
9 for d in deploy.parse_install_lines(show, options.versions_path, True, user=options.user):
10 if isinstance(d, Exception):
13 if options.exists and not os.path.exists(os.path.join(d.location, options.exists)):
17 logging.warning("%d errors, see 'wizard errors --verbose' for details" % errors)
19 def parse_args(argv, baton):
20 usage = """usage: %prog list [ARGS] [APP[-VERSION]]
22 Lists the locations of all autoinstalls, optionally
23 filtered on parameters such as application name and version.
28 %prog list --exists php.ini
29 List all autoinstalls with php.ini
31 List only MediaWiki autoinstalls
32 %prog list mediawiki-1.11.0
33 List only Mediawiki 1.11.0 autoinstalls"""
34 parser = command.WizardOptionParser(usage)
35 parser.add_option("-e", "--exists", dest="exists",
36 help="only print deployment if FILE exists", metavar="FILE")
37 baton.push(parser, "versions_path")
38 baton.push(parser, "user")
39 options, args = parser.parse_all(argv)
41 parser.error("too many arguments")