auto-update.py: Added aarch64 check for pwngrid/bettercap

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-11-19 15:17:56 +01:00
parent cafeae5191
commit f1a12d6cbd

View File

@ -35,22 +35,23 @@ def check(version, repo, native=True):
if remote > local: if remote > local:
if not native: if not native:
info['url'] = "https://github.com/%s/archive/%s.zip" % (repo, latest['tag_name']) info['url'] = "https://github.com/%s/archive/%s.zip" % (repo, latest['tag_name'])
elif is_arm: else:
# check if this release is compatible with arm6 if is_arm:
for asset in latest['assets']: # check if this release is compatible with arm6
download_url = asset['browser_download_url'] for asset in latest['assets']:
if (download_url.endswith('.zip') and download_url = asset['browser_download_url']
(info['arch'] in download_url or (is_arm and 'armhf' in download_url))): if (download_url.endswith('.zip') and
info['url'] = download_url (info['arch'] in download_url or (is_arm and 'armhf' in download_url))):
break info['url'] = download_url
elif is_arm64: break
# check if this release is compatible with aarch64 elif is_arm64:
for asset in latest['assets']: # check if this release is compatible with aarch64
download_url = asset['browser_download_url'] for asset in latest['assets']:
if (download_url.endswith('.zip') and download_url = asset['browser_download_url']
(info['arch'] in download_url or (is_arm64 and 'aarch64' in download_url))): if (download_url.endswith('.zip') and
info['url'] = download_url (info['arch'] in download_url or (is_arm64 and 'aarch64' in download_url))):
break info['url'] = download_url
break
return info return info