1
0
Fork 0
mirror of https://github.com/aclist/dztui.git synced 2024-12-28 21:32:36 +01:00

fix: use update_config func

This commit is contained in:
aclist 2023-12-18 12:14:51 +09:00
parent dc6f82ed6e
commit 371da6c4bf

View file

@ -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]}"