#! /usr/bin/env python3 """ Vhex kernel developement script """ import sys import scripts __HELP__ = """ usage: vxdev [ACTION] ... Actions: configure perform configuration step build perfrom build step install perform installation step uninstall perform uninstallation step Options: -h,--help display this message You can try `vxdev --help` for more information about each action """ #--- # Public #--- def _main(argv): """ main entry of the script """ if '-h' in argv or '--help' in argv: print(__HELP__) sys.exit(0) if not argv: print(__HELP__) sys.exit(84) if argv[0] == 'configure': sys.exit(scripts.configure(argv[1:])) if argv[0] == 'build': sys.exit(scripts.build(argv[1:])) if argv[0] == 'install': sys.exit(scripts.install(argv[1:])) if argv[0] == 'uninstall': sys.exit(scripts.uninstall(argv[1:])) print(f"unrecognized argument '{argv[0]}'", file=sys.stderr) sys.exit(84) sys.exit(_main(sys.argv[1:]))