From 999b130224fb3a147ed1d4ba2a2f19090b0f7094 Mon Sep 17 00:00:00 2001 From: Simone Margaritelli Date: Sun, 20 Oct 2019 20:46:18 +0200 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- pwnagotchi/plugins/default/auto-update.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pwnagotchi/plugins/default/auto-update.py b/pwnagotchi/plugins/default/auto-update.py index 878d707c..9e5be0ec 100644 --- a/pwnagotchi/plugins/default/auto-update.py +++ b/pwnagotchi/plugins/default/auto-update.py @@ -82,7 +82,7 @@ def install(display, update): display.update(force=True, new_data={'status': 'Extracting %s ...' % name}) - os.system('unzip "%s" -d "%s"' % (target_path, path)) + os.system('unzip "%s" -q -d "%s"' % (target_path, path)) source_path = os.path.join(path, name) checksums = glob.glob("%s/*.sha256" % path) @@ -120,6 +120,9 @@ def install(display, update): logging.info("[update] service %s start" % update['service']) else: + if not os.path.exists(source_path): + source_path = "%s-%s" % (source_path, update['available']) + logging.info("[update] cd %s && pip3 install ." % source_path) return True