add entry. fix mach machine
This commit is contained in:
10
cliget.py
10
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"):
|
||||
|
Reference in New Issue
Block a user