parser.add_option("-p", "--pass", "--password", action="callback", type="string", callback=parse_password_callback, dest="cmd_passwd_str", default=" -p") parser.add_option("-u", "--user", "--username", action="store", dest="username") parser.add_option("--db", "--dbfile", action="store", dest="filename") (options, args) = parser.parse_args() return options if __name__ == '__main__': my_args = parse_cmd_args() #print (my_args) if os.name == "nt": dep_check.win32() else: dep_check.linux() if my_args.update: update_db_install(my_args) else: fresh_db_install(my_args)
action="store_true", dest="debug") return parser.parse_args() if __name__ == '__main__': opts = parse_cmd_args() if opts.debug: print ("Src Build Dir: "+ opts.build_dir) if opts.build_dir == ".": opts.build_dir = os.getcwd() else: os.chdir(opts.build_dir) if opts.debug: print ("Dep Check!!!!") if os.name == "nt": dep_check.win32(opts) else: dep_check.linux(opts) if opts.debug: print ("Fetching Pre-Build") if opts.fetch: fetch_repos.pre_build_fetch(opts) if opts.debug: print ("Building Server") if os.name == "nt": if opts.build: windows_build.make(opts) if opts.install: windows_build.install(opts) else: if opts.build: linux_build.make(opts) os.chdir(opts.build_dir) if opts.debug: print ("Fetching Post-Build")
action="callback", type="string", callback=parse_password_callback, dest="cmd_passwd_str", default=" -p") parser.add_option("-u", "--user", "--username", action="store", dest="username") parser.add_option("--db", "--dbfile", action="store", dest="filename") (options, args) = parser.parse_args() return options if __name__ == '__main__': my_args = parse_cmd_args() #print (my_args) if os.name == "nt": dep_check.win32() else: dep_check.linux() if my_args.update: update_db_install(my_args) else: fresh_db_install(my_args)