mirror of
https://github.com/RetroDECK/RetroDECK.git
synced 2024-11-25 07:25:38 +00:00
Fix similar-name setting detection in presets engine
This commit is contained in:
parent
a0a669a16f
commit
5ed2ecd110
|
@ -128,7 +128,7 @@ build_preset_config() {
|
||||||
create_dir "$(realpath "$(dirname "$read_target_file")")"
|
create_dir "$(realpath "$(dirname "$read_target_file")")"
|
||||||
echo "$read_setting_name = \""$new_setting_value"\"" > "$read_target_file"
|
echo "$read_setting_name = \""$new_setting_value"\"" > "$read_target_file"
|
||||||
else
|
else
|
||||||
if [[ -z $(grep "$read_setting_name" "$read_target_file") ]]; then
|
if [[ -z $(grep -o -P "^$read_setting_name\b" "$read_target_file") ]]; then
|
||||||
add_setting "$read_target_file" "$read_setting_name" "$new_setting_value" "$read_config_format" "$section"
|
add_setting "$read_target_file" "$read_setting_name" "$new_setting_value" "$read_config_format" "$section"
|
||||||
else
|
else
|
||||||
set_setting_value "$read_target_file" "$read_setting_name" "$new_setting_value" "$read_config_format" "$section"
|
set_setting_value "$read_target_file" "$read_setting_name" "$new_setting_value" "$read_config_format" "$section"
|
||||||
|
|
Loading…
Reference in a new issue