From 7a7e1b64d4952b98260c63249a439e9b5e5bd912 Mon Sep 17 00:00:00 2001 From: setop Date: Sun, 2 Jul 2023 19:20:19 +0200 Subject: [PATCH] add entry. fix mach machine --- catalog.yaml | 9 +++++++++ cliget.py | 10 ++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/catalog.yaml b/catalog.yaml index 4c5b827..a885c66 100644 --- a/catalog.yaml +++ b/catalog.yaml @@ -1,6 +1,7 @@ ab: fullname: Apache Benchmark desc: a tool for benchmarking your Apache Hypertext Transfer Protocol (HTTP) server + website: https://httpd.apache.org/docs/2.4/programs/ab.html arc: desc: Easily create & extract archives, and compress & decompress files of various formats @@ -53,6 +54,10 @@ d2: website: https://d2-lang.com/ github: terrastruct/d2 +diskonaut: + desc: Terminal disk space navigator, disk tree-map + github: imsnif/diskonaut + dslcad: desc: a programming language & interpreter for building 3D models github: DSchroer/dslcad @@ -199,6 +204,10 @@ outrun: github: Overv/outrun pip: +pagefind: + desc: Static low-bandwidth search at scale + github: CloudCannon/pagefind + pandoc: desc: Universal markup converter website: https://pandoc.org/ diff --git a/cliget.py b/cliget.py index 4b8f199..6c982cf 100644 --- a/cliget.py +++ b/cliget.py @@ -278,6 +278,9 @@ def _match_arch_machine(name: str) -> bool: machine = os.uname().machine.lower() # arch # we don't consider libc - glic or musl - as musl is usually statically embed lname = name.lower() + if sysname == 'linux' and machine == 'x86_64': + if lname.find('linux64')>0: + return True return lname.find(sysname) > 0 and ( lname.find(machine) > 0 or (machine == "x86_64" and lname.find("amd64") > 0) ) # x86_64 and "amd64" are synonym @@ -307,9 +310,12 @@ def _perform_gh_install(cli, repo, version=None): # dl asset if not already there if not p.exists(location): dlurl = http.get(asset.url).json()["browser_download_url"] - r = http.get(dlurl, allow_redirects=True, stream=True) + trace(f'{dlurl=}') + r = http.get(dlurl, allow_redirects=True) #, stream=True) + trace(f'{r=}') with open(location, "wb") as fd: - shutil.copyfileobj(r.raw, fd) + #shutil.copyfileobj(r.raw, fd) + fd.write(r.content) trace("downloaded") # unpack asset if not asset.name.endswith(".tar.gz"):