From f1a12d6cbde565ca3f8d6937d1959b3d0265660d Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sun, 19 Nov 2023 15:17:56 +0100 Subject: [PATCH] auto-update.py: Added aarch64 check for pwngrid/bettercap Signed-off-by: Jeroen Oudshoorn --- pwnagotchi/plugins/default/auto-update.py | 33 ++++++++++++----------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/pwnagotchi/plugins/default/auto-update.py b/pwnagotchi/plugins/default/auto-update.py index 044d8ae8..dde64d90 100644 --- a/pwnagotchi/plugins/default/auto-update.py +++ b/pwnagotchi/plugins/default/auto-update.py @@ -35,22 +35,23 @@ def check(version, repo, native=True): if remote > local: if not native: info['url'] = "https://github.com/%s/archive/%s.zip" % (repo, latest['tag_name']) - elif is_arm: - # check if this release is compatible with arm6 - for asset in latest['assets']: - 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))): - 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 - break + else: + if is_arm: + # check if this release is compatible with arm6 + for asset in latest['assets']: + 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))): + 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 + break return info