From d7437aae5d15f107fdc52dc33f23908449a602c5 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 18 Oct 2023 12:31:36 +0200 Subject: [PATCH] Add distrobox shortcuts --- scripts/README.md | 11 +++++++++++ scripts/p7s/distrobox.py | 10 ++++++++++ scripts/pyproject.toml | 2 ++ 3 files changed, 23 insertions(+) create mode 100644 scripts/README.md create mode 100644 scripts/p7s/distrobox.py diff --git a/scripts/README.md b/scripts/README.md new file mode 100644 index 0000000..2760613 --- /dev/null +++ b/scripts/README.md @@ -0,0 +1,11 @@ +Local installation EL8: + +``` +$ pipx install -e . --force --python /usr/bin/python3.9 +``` + +Local installation EL9: + +``` +$ pipx install -e . --force --python /usr/bin/python3.9 +``` diff --git a/scripts/p7s/distrobox.py b/scripts/p7s/distrobox.py new file mode 100644 index 0000000..45e11a6 --- /dev/null +++ b/scripts/p7s/distrobox.py @@ -0,0 +1,10 @@ +import os +import subprocess + + +def create(): + subprocess.run(["distrobox", "create", "-i", "quay.io/alexpdp7/workstation:latest"], check=True) + + +def enter(): + os.execvp("distrobox", ["distrobox", "enter", "workstation-latest"]) diff --git a/scripts/pyproject.toml b/scripts/pyproject.toml index bef039f..2df3f45 100644 --- a/scripts/pyproject.toml +++ b/scripts/pyproject.toml @@ -18,3 +18,5 @@ build-backend = "poetry.core.masonry.api" [tool.poetry.scripts] ruscreen = 'p7s.ruscreen:main' mbsync_config = 'p7s.mbsync:generate_config' +db-create = 'p7s.distrobox:create' +db-enter = 'p7s.distrobox:enter' -- 2.47.3