diff --git a/functions/presets.sh b/functions/presets.sh index c5d8af4a..19fcbcec 100644 --- a/functions/presets.sh +++ b/functions/presets.sh @@ -128,7 +128,7 @@ build_preset_config() { create_dir "$(realpath "$(dirname "$read_target_file")")" echo "$read_setting_name = \""$new_setting_value"\"" > "$read_target_file" 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" else set_setting_value "$read_target_file" "$read_setting_name" "$new_setting_value" "$read_config_format" "$section"