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