mirror of
https://github.com/aclist/dztui.git
synced 2024-12-29 13:52:03 +01:00
fix: use update_config func
This commit is contained in:
parent
dc6f82ed6e
commit
371da6c4bf
1 changed files with 2 additions and 5 deletions
7
dzgui.sh
7
dzgui.sh
|
@ -41,11 +41,8 @@ steamsafe_zenity="/usr/bin/zenity"
|
|||
|
||||
update_last_seen(){
|
||||
local news_sum="$1"
|
||||
mv $config_file ${config_path}dztuirc.old
|
||||
nr=$(awk '/seen_news=/ {print NR}' ${config_path}dztuirc.old)
|
||||
seen_news="seen_news=\"$news_sum\""
|
||||
awk -v "var=$seen_news" -v "nr=$nr" 'NR==nr {$0=var}{print}' ${config_path}dztuirc.old > $config_file
|
||||
source $config_file
|
||||
seen_news="$news_sum"
|
||||
update_config
|
||||
}
|
||||
check_news(){
|
||||
logger INFO "${FUNCNAME[0]}"
|
||||
|
|
Loading…
Reference in a new issue