aboutsummaryrefslogtreecommitdiff
path: root/scripts/p7s/ubpkg.py
blob: 3a333254f3e00e7907ae41334a29821b64bcc30a (plain)
1
2
3
4
5
6
7
8
9
10
11
import os
import pathlib
import platform
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)