diff options
| author | alex <alex@pdp7.net> | 2024-02-03 17:53:24 +0100 |
|---|---|---|
| committer | alex <alex@pdp7.net> | 2024-02-03 17:53:24 +0100 |
| commit | cfabe8d2784383f5bd8e53602032d7b1006c094f (patch) | |
| tree | b2433cf0ce2b475452c8dfa8ecbbe016887504a1 /scripts/p7s | |
| parent | 8ede99045259cfa72b5659da210836d4e47da5f4 (diff) | |
Add db-update command
Diffstat (limited to 'scripts/p7s')
| -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) |
