aboutsummaryrefslogtreecommitdiff
path: root/scripts/p7s/ubpkg.py
blob: 4249c3e08c5602c8fbca7e913dd6c08baff935d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import os
import pathlib
import platform
import subprocess
import urllib.request


def setup_ubpkg():
    ubpkg = pathlib.Path.home() / ".local" / "bin" / "ubpkg"
    with urllib.request.urlopen(f"https://github.com/alexpdp7/ubpkg/releases/latest/download/ubpkg-linux-{platform.machine()}") as urlopen:
        ubpkg.write_bytes(urlopen.read())
    os.chmod(ubpkg, 0o700)

    # Currently Vaultwarden in EPEL is not compatible with latest Bitwarden CLI https://github.com/dani-garcia/vaultwarden/issues/7820
    subprocess.run([ubpkg, "deltachat-rpc-server", "hatch", "kubectl", "nix-portable", "ressh", "talosctl", "typst"], check=True)