fix Get update button

This commit is contained in:
Your Name 2025-01-04 13:50:50 +03:00
parent e930ce6994
commit 023037ef61
2 changed files with 5 additions and 4 deletions

View file

@ -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:')

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
termux-notification-remove ub4tgupd
cd $1