From 9d32b46694bde6bd3daed2d6d27a1988335b05aa Mon Sep 17 00:00:00 2001 From: Tyler Page Date: Sat, 6 Jul 2019 16:25:49 +0000 Subject: [PATCH] Update updater.sh --- updater.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/updater.sh b/updater.sh index 52d2a88..84bdc7b 100755 --- a/updater.sh +++ b/updater.sh @@ -143,11 +143,11 @@ open_file () { #expects one argument: file_path } readIniFile () { # expects one argument: absolute path of profiles.ini - inifile="$1" + declare -r inifile="$1" + tfile="$(mktemp)" - declare -r inifile - declare -r tfile - + declare -r $tfile + if [ "$(grep -c '^\[Profile' "$inifile")" == "1" ]; then ### only 1 profile found grep '^\[Profile' -A 4 "$inifile" | grep -v '^\[Profile' > "$tfile" else