fix Get update button
This commit is contained in:
parent
e930ce6994
commit
023037ef61
2 changed files with 5 additions and 4 deletions
|
@ -19,11 +19,12 @@ async def git_notifications_update():
|
||||||
if len(commits) <= 5:
|
if len(commits) <= 5:
|
||||||
logger.info('updates not found, nothing to do')
|
logger.info('updates not found, nothing to do')
|
||||||
else:
|
else:
|
||||||
os.system(
|
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}'"
|
||||||
f"cat upd_info | termux-notification -i ub4tgupd --title 'ub4tg: update avalaible!' --button1 'Get update' --button1-action {cwd}/updater_helper.sh")
|
logger.debug(f'executing: {cmd_for_update}')
|
||||||
|
os.system(cmd_for_update)
|
||||||
else:
|
else:
|
||||||
os.system(
|
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:
|
else:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
'For getting updates via notifications, you should:')
|
'For getting updates via notifications, you should:')
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
termux-notification-remove ub4tgupd
|
termux-notification-remove ub4tgupd
|
||||||
cd $1
|
cd $1
|
||||||
|
|
Loading…
Reference in a new issue