diff --git a/opensuse-personalizer.sh b/opensuse-personalizer.sh index 779bdb1..a6c6d7f 100755 --- a/opensuse-personalizer.sh +++ b/opensuse-personalizer.sh @@ -260,7 +260,7 @@ detected_features=() # Mobile system detection case "${system_chassis}" in "latop"|"convertible"|"tablet") - PATTERNS+=('patterns-desktop-mobile') + detected_features+=('Mobile') ;; esac @@ -269,7 +269,7 @@ CPU_FLAGS=$(cat /proc/cpuinfo | grep flags | head -n 1 | cut -d: -f2) if echo CPU_FLAGS | awk '/avx/&&/avx2/&&/bmi1/&&/bmi2/&&/f16c/&&/fma/&&/abm/&&/movbe/&&/xsave/ {found=1} END {exit !found}' then - PATTERNS+=('patterns-glibc-hwcaps-x86_64_v3') + detected_features+=('x86-64-v3') fi # Touchpad detection @@ -296,7 +296,15 @@ fi # Package operations echo "Setting up packages..." + sudo zypper --non-interactive in ${PATTERNS[@]} +if [[ "${detected_features[@]}" == *"Mobile"* ]]; then + sudo zypper in patterns-desktop-mobile +fi +if [[ "${detected_features[@]}" == *"x86-64-v3"* ]]; then + sudo zypper in patterns-glibc-hwcaps-x86_64_v3 +fi + sudo zypper --non-interactive rm ${RM[@]} ${AL[@]} sudo zypper --non-interactive al ${AL[@]} sudo zypper --non-interactive in ${IN[@]}