From 371da6c4bf355569269bc23922e8b3dd0bb8258e Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Mon, 18 Dec 2023 12:14:51 +0900 Subject: [PATCH] fix: use update_config func --- dzgui.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dzgui.sh b/dzgui.sh index 3b354cc..3da3ca1 100755 --- a/dzgui.sh +++ b/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]}"