mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
auto-update.py: Added aarch64 check for pwngrid/bettercap
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
@ -28,17 +28,27 @@ def check(version, repo, native=True):
|
|||||||
latest = resp.json()
|
latest = resp.json()
|
||||||
info['available'] = latest_ver = latest['tag_name'].replace('v', '')
|
info['available'] = latest_ver = latest['tag_name'].replace('v', '')
|
||||||
is_arm = info['arch'].startswith('arm')
|
is_arm = info['arch'].startswith('arm')
|
||||||
|
is_arm64 = info['arch'].startwith('aarch')
|
||||||
|
|
||||||
local = version_to_tuple(info['current'])
|
local = version_to_tuple(info['current'])
|
||||||
remote = version_to_tuple(latest_ver)
|
remote = version_to_tuple(latest_ver)
|
||||||
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'])
|
||||||
else:
|
elif is_arm:
|
||||||
# check if this release is compatible with arm6
|
# check if this release is compatible with arm6
|
||||||
for asset in latest['assets']:
|
for asset in latest['assets']:
|
||||||
download_url = asset['browser_download_url']
|
download_url = asset['browser_download_url']
|
||||||
if download_url.endswith('.zip') and (info['arch'] in download_url or (is_arm and 'armhf' in download_url)):
|
if (download_url.endswith('.zip') and
|
||||||
|
(info['arch'] in download_url or (is_arm and 'armhf' in download_url))):
|
||||||
|
info['url'] = download_url
|
||||||
|
break
|
||||||
|
elif is_arm64:
|
||||||
|
# check if this release is compatible with aarch64
|
||||||
|
for asset in latest['assets']:
|
||||||
|
download_url = asset['browser_download_url']
|
||||||
|
if (download_url.endswith('.zip') and
|
||||||
|
(info['arch'] in download_url or (is_arm64 and 'aarch64' in download_url))):
|
||||||
info['url'] = download_url
|
info['url'] = download_url
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user