18 lines
403 B
Python
Executable file
18 lines
403 B
Python
Executable file
#! /usr/bin/env python3
|
|
|
|
"""Entry point to either bootstrap or command."""
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
import cd
|
|
|
|
if __name__ == "__main__":
|
|
path, *arguments = sys.argv
|
|
name = Path(path).name
|
|
if name == "__main__.py":
|
|
cd.set_ssh(*arguments)
|
|
cd.install_commands(__file__)
|
|
else:
|
|
function = getattr(cd, name.replace("-", "_"))
|
|
function(*arguments)
|