]> xn--ix-yja.es Git - alex.git/commitdiff
Support ubpkg multiarch
authoralex <alex@pdp7.net>
Sat, 24 Aug 2024 12:28:46 +0000 (14:28 +0200)
committeralexpdp7 <alex@corcoles.net>
Sat, 24 Aug 2024 12:30:50 +0000 (14:30 +0200)
scripts/p7s/ubpkg.py

index 72495f412c30c10e0925f930cca7ff30af6830b4..9a75cb5196b98db15ed0e3e60927d0d30e95b428 100644 (file)
@@ -1,5 +1,6 @@
 import os
 import pathlib
+import platform
 import shutil
 
 import httpx
@@ -7,5 +8,5 @@ import httpx
 
 def setup_ubpkg():
     ubpkg = pathlib.Path.home() / ".local" / "bin" / "ubpkg"
-    ubpkg.write_bytes(httpx.get("https://github.com/alexpdp7/ubpkg/releases/latest/download/ubpkg-linux", follow_redirects=True).content)
+    ubpkg.write_bytes(httpx.get(f"https://github.com/alexpdp7/ubpkg/releases/latest/download/ubpkg-linux-{platform.machine()}", follow_redirects=True).content)
     os.chmod(ubpkg, 0o700)