]> xn--ix-yja.es Git - alex.git/commitdiff
Setup cmdainer and workstation
authoralex <alex@pdp7.net>
Sun, 7 May 2023 09:57:16 +0000 (09:57 +0000)
committeralex <alex@pdp7.net>
Sun, 7 May 2023 09:57:16 +0000 (09:57 +0000)
workstation/setup.py

index 98bd7787dd24e82a470eb024140f3977bcae2451..76d1c5c24d54e6c1166facfaf1f03180079fb0c0 100755 (executable)
@@ -10,7 +10,7 @@ def _(t):
 
 
 print("Installing some packages...")
-subprocess.run(["sudo", "dnf", "install", "-y", "rclone", "fuse", "git"], check=True)
+subprocess.run(["sudo", "dnf", "install", "-y", "rclone", "fuse", "git", "podman-docker", "wget"], check=True)
 
 if not (pathlib.Path.home() / ".config" / "rclone" / "rclone.conf").exists():
     print(_("""
@@ -52,3 +52,12 @@ for dotfile in dotfiles_dir.glob("*"):
     if not replaced_dotfile.exists():
         subprocess.run(["ln", "-s", dotfile, replaced_dotfile], check=True)
 
+
+(pathlib.Path.home() / ".local" / "bin").mkdir(exist_ok=True, parents=True)
+
+subprocess.run(["wget", "https://github.com/alexpdp7/cmdainer/releases/latest/download/cmdainer-linux", "-O", "/home/alex/.local/bin/cmdainer"], check=True)
+subprocess.run(["chmod", "+x", "/home/alex/.local/bin/cmdainer"], check=True)
+
+if not shutil.which("cmdainer"):
+    subprocess.run(["cmdainer", "add-wrapper", "workstation", "/bin/bash", "quay.io/alexpdp7/workstation:latest"], check=True)
+