import optparse import sys import wizard.deploy as wd def main(argv, global_options): usage = """usage: %prog migrate [ARGS] DIR Migrates a directory to our Git-based autoinstall format. Performs basic sanity checking and intelligently determines what repository and tag to use. NOTICE: Currently doesn't do anything.""" parser = optparse.OptionParser(usage) parser.add_option("-v", "--verbose", dest="verbose", action="store_true", default=False, help="Print all commands and outputs") parser.add_option("--dry-run", dest="dry_run", action="store_true", default=False, help="Prints would would be run without changing anything") options, args = parser.parse_args(argv) if len(args) > 1: parser.error("too many arguments") elif not args: parser.error("must specify directory") dir = args[0] print dir print options