rest_argv = args[1:]
baton = command.OptionBaton()
baton.add("--versions-path", dest="versions_path",
- default=os.getenv("WIZARD_VERSIONS_PATH") or "/afs/athena.mit.edu/contrib/scripts/sec-tools/store/versions",
+ default=getenvpath("WIZARD_VERSIONS_PATH") or "/afs/athena.mit.edu/contrib/scripts/sec-tools/store/versions",
help="Location of parallel-find output directory, or a file containing a newline separated list of 'all autoinstalls' (for development work). Environment variable is WIZARD_VERSIONS_PATH.")
baton.add("--srv-path", dest="srv_path",
- default=os.getenv("WIZARD_SRV_PATH") or "/afs/athena.mit.edu/contrib/scripts/git/autoinstalls",
+ default=getenvpath("WIZARD_SRV_PATH") or "/afs/athena.mit.edu/contrib/scripts/git/autoinstalls",
help="Location of autoinstall Git repositories, such that $REPO_PATH/$APP.git is a repository (for development work). Environment variable is WIZARD_SRV_PATH.")
try:
command_name = args[0]
__import__("wizard.command." + name)
return getattr(wizard.command, name)
+def getenvpath(name):
+ val = os.getenv(name)
+ if val:
+ val = os.path.abspath(val)
+ return val
+
if __name__ == "__main__":
main()
group.add_option("-v", "--verbose", dest="verbose", action="store_true",
default=boolish(os.getenv("WIZARD_VERBOSE")), help="Turns on verbose output. Environment variable is WIZARD_VERBOSE")
group.add_option("--debug", dest="debug", action="store_true",
- default=boolish("WIZARD_DEBUG"), help="Turns on debugging output. Environment variable is WIZARD_DEBUG")
+ default=boolish(os.getenv("WIZARD_DEBUG")), help="Turns on debugging output. Environment variable is WIZARD_DEBUG")
group.add_option("-q", "--quiet", dest="quiet", action="store_true",
- default=False, help="Turns off output to stdout")
+ default=boolish(os.getenv("WIZARD_QUIET")), help="Turns off output to stdout. Environment variable is WIZARD_QUIET")
group.add_option("--log-file", dest="log_file", metavar="FILE",
default=None, help="Logs verbose output to file")
group.add_option("--log-file-chmod", dest="log_file_chmod", metavar="CHMOD",