8 sys.path.insert(0,os.path.abspath(os.path.join(__file__,'../../lib')))
12 usage = """usage: %prog [-d|--version-dir] COMMAND [ARGS]
14 Wizard is a Git-based autoinstall management system for scripts.
17 info Reports information about an autoinstall
18 massmigrate Performs mass migration of autoinstalls of an application
19 migrate Migrate autoinstalls from old format to Git-based format
20 summary Generate statistics about autoinstalls
22 See '%prog help COMMAND' for more information on a specific command."""
24 parser = optparse.OptionParser(usage)
25 parser.add_option("-d", "--version-dir", dest="version_dir",
26 default="/afs/athena.mit.edu/contrib/scripts/sec-tools/store/versions",
27 help="Location of parallel-find output")
28 # Find the end of the "global" options
31 while not sys.argv[i] or sys.argv[i][0] == '-':
32 if sys.argv[i] == "-h" or sys.argv[i] == "--help":
39 options, args = parser.parse_args(sys.argv[1:i+1])
40 rest_argv = sys.argv[i+1:]
41 command = args[0] # shouldn't fail
44 getattr(wizard.command, rest_argv[0])(['-h'], options)
45 except AttributeError:
46 parser.error("invalid action")
52 command_fn = getattr(wizard.command, command)
53 except AttributeError:
54 parser.error("invalid action")
55 command_fn(rest_argv, options)
57 if __name__ == "__main__":