]> xn--ix-yja.es Git - alex.git/commitdiff
Add setup_ubpkg
authoralex <alex@pdp7.net>
Sat, 23 Mar 2024 19:04:24 +0000 (20:04 +0100)
committeralex <alex@pdp7.net>
Sat, 23 Mar 2024 19:04:24 +0000 (20:04 +0100)
scripts/p7s/ubpkg.py [new file with mode: 0644]
scripts/pyproject.toml

diff --git a/scripts/p7s/ubpkg.py b/scripts/p7s/ubpkg.py
new file mode 100644 (file)
index 0000000..72495f4
--- /dev/null
@@ -0,0 +1,11 @@
+import os
+import pathlib
+import shutil
+
+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)
+    os.chmod(ubpkg, 0o700)
index 7f4b640372b679d84c6410746267ac18ce0f096b..225ab824e28787791bc5be53b580c9c43f53575a 100644 (file)
@@ -25,4 +25,5 @@ nextcloud_setup = 'p7s.nextcloud:setup_nextcloud'
 soju_setup = 'p7s.soju:setup_soju'
 bitlbee_setup = 'p7s.bitlbee:setup_bitlbee'
 setup_emacs = 'p7s.emacs:setup_emacs'
+setup_ubpkg = 'p7s.ubpkg:setup_ubpkg'
 update_zfs = 'p7s.zfs:update_zfs'