From 2352d655a3b3c1fbd1bc7977a055f734ea6757f0 Mon Sep 17 00:00:00 2001 From: Eduard Veit Date: Thu, 30 Jun 2022 14:25:56 +0200 Subject: [PATCH] refactor(extract method): read_config_file --- dynb.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/dynb.sh b/dynb.sh index bc2baf9..49deae2 100755 --- a/dynb.sh +++ b/dynb.sh @@ -813,11 +813,8 @@ function check_internet_connection fi } -function main +function read_config_file { - # shellcheck disable=SC1091,SC1090 - source "$(dirname "$(realpath "$0")")/dynb-parsing.sh" - # shellcheck source=.env if test -f "$_configFile" then @@ -831,6 +828,15 @@ function main source "$alternativeConfig" fi fi +} + +function main +{ + # shellcheck disable=SC1091,SC1090 + source "$(dirname "$(realpath "$0")")/dynb-parsing.sh" + + read_config_file + if test -f "$_statusFile" then debugMessage "read previous status file"