diff --git a/src/updatenotif.py b/src/updatenotif.py index e111f77..e940f8b 100644 --- a/src/updatenotif.py +++ b/src/updatenotif.py @@ -19,11 +19,12 @@ async def git_notifications_update(): if len(commits) <= 5: logger.info('updates not found, nothing to do') else: - os.system( - f"cat upd_info | termux-notification -i ub4tgupd --title 'ub4tg: update avalaible!' --button1 'Get update' --button1-action {cwd}/updater_helper.sh") + cmd_for_update = f"cat upd_info | termux-notification -i ub4tgupd --title 'ub4tg: update avalaible!' --button1 'Get update' --button1-action '{cwd}/updater_helper.sh {cwd}'" + logger.debug(f'executing: {cmd_for_update}') + os.system(cmd_for_update) else: os.system( - "termux-toast '[ub4tg]: failed fetching update, maybe connection error, check console log for more info'") + "termux-toast -b black -c red '[ub4tg]: failed fetching update, maybe connection error, check console log for more info'") else: logger.warning( 'For getting updates via notifications, you should:') diff --git a/updater_helper.sh b/updater_helper.sh index f87a98f..28c77ac 100755 --- a/updater_helper.sh +++ b/updater_helper.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh termux-notification-remove ub4tgupd cd $1