]> xn--ix-yja.es Git - alex.git/commitdiff
Add distrobox shortcuts
authoralex <alex@pdp7.net>
Wed, 18 Oct 2023 10:31:36 +0000 (12:31 +0200)
committeralex <alex@pdp7.net>
Wed, 18 Oct 2023 10:31:36 +0000 (12:31 +0200)
scripts/README.md [new file with mode: 0644]
scripts/p7s/distrobox.py [new file with mode: 0644]
scripts/pyproject.toml

diff --git a/scripts/README.md b/scripts/README.md
new file mode 100644 (file)
index 0000000..2760613
--- /dev/null
@@ -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 (file)
index 0000000..45e11a6
--- /dev/null
@@ -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"])
index bef039fd00873bd9a70d064375bbdab38a293554..2df3f45549b6ff82e6b5666e5e8b940af6bf904e 100644 (file)
@@ -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'