diff --git a/linux-tkg-config/prepare b/linux-tkg-config/prepare index 5d3d315..88dfb1c 100644 --- a/linux-tkg-config/prepare +++ b/linux-tkg-config/prepare @@ -238,15 +238,16 @@ _tkg_initscript() { cp "$_where"/linux-tkg-config/${_basekernel}/* "$_path" fi - if [ -z "$_OPTIPROFILE" ]; then + if [[ -z "$_OPTIPROFILE" || ! "$_OPTIPROFILE" =~ ^(1|2|3)$ ]]; then # Prompt about optimized configurations. Available variable values will overwrite customization.cfg/external config ones. plain "Do you want to use a predefined optimized profile?" _default_index="0" _prompt_from_array "Custom" "Ryzen Desktop (Performance)" "Other Desktop (Performance)" + _OPTIPROFILE=$((${_selected_index}+1)) fi - if [ "$_selected_index" = "1" ]; then + if [ "$_OPTIPROFILE" = "2" ]; then source "$_where"/linux-tkg-config/ryzen-desktop-profile.cfg && msg2 "Ryzen Desktop (Performance) profile will be used." && msg2 "" - elif [ "$_selected_index" = "2" ]; then + elif [ "$_OPTIPROFILE" = "3" ]; then source "$_where"/linux-tkg-config/generic-desktop-profile.cfg && msg2 "Generic Desktop (Performance) profile will be used." && msg2 "" fi