From 7d7acd84945ac5ed8e159aef8ca15e92cb06df89 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 4 Jan 2022 22:13:26 +0100 Subject: [PATCH] root: add ak wrapper script to be installed with poetry Signed-off-by: Jens Langhammer --- lifecycle/ak.py | 15 +++++++++++++++ pyproject.toml | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 lifecycle/ak.py diff --git a/lifecycle/ak.py b/lifecycle/ak.py new file mode 100644 index 000000000..deac5a7d6 --- /dev/null +++ b/lifecycle/ak.py @@ -0,0 +1,15 @@ +"""Wrapper for lifecycle/ak, to be installed by poetry""" +from os import system +from pathlib import Path +from sys import argv + + +def main(): + """Wrapper around ak bash script""" + current_path = Path(__file__) + args = " ".join(argv[1:]) + system(f"{current_path.parent}/ak {args}") # nosec + + +if __name__ == "__main__": + main() diff --git a/pyproject.toml b/pyproject.toml index ffc974832..eeddcad4c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -165,3 +165,6 @@ selenium = "*" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" + +[tool.poetry.scripts] +ak = "lifecycle.ak:main"