From a6bcb1ce2546bd3561b0353021b38e2fd5cd879b Mon Sep 17 00:00:00 2001 From: Locutus73 Date: Mon, 27 May 2019 12:46:12 +0200 Subject: [PATCH] Version 1.0.4 Improved ini value reading: only the first instance of a key is read, so specific core settings will be ignored. --- ini_settings.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ini_settings.sh b/ini_settings.sh index 8d43039..6ec3ab6 100644 --- a/ini_settings.sh +++ b/ini_settings.sh @@ -18,6 +18,7 @@ # You can download the latest version of this script from: # https://github.com/MiSTer-devel/Scripts_MiSTer +# Version 1.0.4 - 2019-05-27 - Improved ini value reading: only the first instance of a key is read, so specific core settings will be ignored. # Version 1.0.4 - 2019-05-27 - Improved textual descriptions of options; removed hostname check, so users can use different hostnames than MiSTer; pressing ESC in submenus returns to the main menu instead of quitting the script. # Version 1.0.3 - 2019-05-26 - Improved DEB packages downloading routine. # Version 1.0.2 - 2019-05-26 - Added error checks during DEB packages downloading. @@ -360,7 +361,7 @@ function checkKEY () { function getVALUE () { INI_KEY="${1}" - INI_VALUE=$(echo "${MISTER_INI}" | grep -oE "^\s*${INI_KEY}\s*=\s*[a-zA-Z0-9.,/_-]+"|sed "s/^\s*${INI_KEY}\s*=\s*//") + INI_VALUE=$(echo "${MISTER_INI}" | grep -oE -m 1 "^\s*${INI_KEY}\s*=\s*[a-zA-Z0-9.,/_-]+"|sed "s/^\s*${INI_KEY}\s*=\s*//") } function setVALUE () {