X-Git-Url: https://scripts.mit.edu/gitweb/wizard.git/blobdiff_plain/40de76124826c6f24a11c0a7d752e37a7af977d9..193c996c0df943f6bd955bdb475548b04ec9e711:/bin/wizard diff --git a/bin/wizard b/bin/wizard index 4fac5dc..4a204e8 100755 --- a/bin/wizard +++ b/bin/wizard @@ -1,13 +1,5 @@ #!/usr/bin/env python -""" -This script does everything autoinstalls! - -Specifically, it: -* Generates basic statistics about autoinstall versions -* Migrates autoinstalls to the new Git format -""" - import os import optparse import sys @@ -22,8 +14,9 @@ def main(): Wizard is a Git-based autoinstall management system for scripts. Its commands are: + info Reports information about an autoinstall migrate Migrate autoinstalls from old format to Git-based format - stat Generate statistics about autoinstalls + summary Generate statistics about autoinstalls See '%prog help COMMAND' for more information on a specific command.""" @@ -55,9 +48,10 @@ See '%prog help COMMAND' for more information on a specific command.""" raise SystemExit(-1) # Dispatch commands try: - getattr(wizard.command, command).main(rest_argv, options) + command_fn = getattr(wizard.command, command) except AttributeError: parser.error("invalid action") + command_fn(rest_argv, options) if __name__ == "__main__": main()