add entry. fix mach machine

This commit is contained in:
setop 2023-07-02 19:20:19 +02:00
parent 9e148590de
commit 7a7e1b64d4
2 changed files with 17 additions and 2 deletions

View File

@ -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/

View File

@ -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"):