aboutsummaryrefslogtreecommitdiff
path: root/scripts/p7s/ubpkg.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/p7s/ubpkg.py')
-rw-r--r--scripts/p7s/ubpkg.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/p7s/ubpkg.py b/scripts/p7s/ubpkg.py
index 9a75cb51..3a333254 100644
--- a/scripts/p7s/ubpkg.py
+++ b/scripts/p7s/ubpkg.py
@@ -1,12 +1,11 @@
import os
import pathlib
import platform
-import shutil
-
-import httpx
+import urllib.request
def setup_ubpkg():
ubpkg = pathlib.Path.home() / ".local" / "bin" / "ubpkg"
- ubpkg.write_bytes(httpx.get(f"https://github.com/alexpdp7/ubpkg/releases/latest/download/ubpkg-linux-{platform.machine()}", follow_redirects=True).content)
+ 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)