This repository has been archived on 2020-06-17. You can view files and clone it, but cannot push or open issues or pull requests.
2020-04-03 12:46:29 +00:00
|
|
|
"""Command-line entrypoint."""
|
|
|
|
|
2020-04-10 22:17:36 +00:00
|
|
|
import os
|
|
|
|
|
2020-04-03 12:46:29 +00:00
|
|
|
import click
|
|
|
|
|
2020-04-10 22:17:36 +00:00
|
|
|
from autonomic.command import init
|
|
|
|
|
2020-04-03 12:46:29 +00:00
|
|
|
|
2020-04-10 22:17:36 +00:00
|
|
|
@click.group()
|
|
|
|
@click.option(
|
|
|
|
"--debug/--no-debug",
|
|
|
|
default=False,
|
|
|
|
help="Enable or disable debug mode",
|
|
|
|
show_default=True,
|
|
|
|
)
|
|
|
|
@click.pass_context
|
|
|
|
def autonomic(ctx, debug):
|
2020-04-03 12:46:29 +00:00
|
|
|
"""
|
|
|
|
\b
|
|
|
|
___ _ _
|
|
|
|
/ _ \ | | (_)
|
|
|
|
/ /_\ \_ _| |_ ___ _ __ ___ _ __ ___ _ ___
|
|
|
|
| _ | | | | __/ _ \| '_ \ / _ \| '_ ` _ \| |/ __|
|
|
|
|
| | | | |_| | || (_) | | | | (_) | | | | | | | (__
|
|
|
|
\_| |_/\__,_|\__\___/|_| |_|\___/|_| |_| |_|_|\___|
|
|
|
|
""" # noqa
|
2020-04-10 22:17:36 +00:00
|
|
|
ctx.obj = {}
|
|
|
|
ctx.obj["DEBUG"] = debug
|
|
|
|
ctx.obj["HOME"] = "/home/{user}".format(user=os.getlogin())
|
2020-04-03 12:46:29 +00:00
|
|
|
|
|
|
|
|
2020-04-10 22:17:36 +00:00
|
|
|
autonomic.add_command(init.init)
|