diff options
Diffstat (limited to 'scripts/p7s/distrobox.py')
| -rw-r--r-- | scripts/p7s/distrobox.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/scripts/p7s/distrobox.py b/scripts/p7s/distrobox.py index 45e11a6f..2e4e5cee 100644 --- a/scripts/p7s/distrobox.py +++ b/scripts/p7s/distrobox.py @@ -2,9 +2,20 @@ import os import subprocess +IMAGE="quay.io/alexpdp7/workstation:latest" +NAME="workstation-latest" + + def create(): - subprocess.run(["distrobox", "create", "-i", "quay.io/alexpdp7/workstation:latest"], check=True) + subprocess.run(["distrobox", "create", "-i", IMAGE], check=True) def enter(): - os.execvp("distrobox", ["distrobox", "enter", "workstation-latest"]) + os.execvp("distrobox", ["distrobox", "enter", NAME]) + + +def update(): + subprocess.run(["distrobox", "rm", "-f", NAME], check=True) + subprocess.run(["podman", "rmi", IMAGE], check=True) + subprocess.run(["podman", "pull", IMAGE], check=True) + subprocess.run(["distrobox", "create", "-i", IMAGE], check=True) |
