Reorganize feature-based pattern installation
This commit is contained in:
parent
1ee4861152
commit
89979ec02f
@ -260,7 +260,7 @@ detected_features=()
|
|||||||
# Mobile system detection
|
# Mobile system detection
|
||||||
case "${system_chassis}" in
|
case "${system_chassis}" in
|
||||||
"latop"|"convertible"|"tablet")
|
"latop"|"convertible"|"tablet")
|
||||||
PATTERNS+=('patterns-desktop-mobile')
|
detected_features+=('Mobile')
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ CPU_FLAGS=$(cat /proc/cpuinfo | grep flags | head -n 1 | cut -d: -f2)
|
|||||||
if
|
if
|
||||||
echo CPU_FLAGS | awk '/avx/&&/avx2/&&/bmi1/&&/bmi2/&&/f16c/&&/fma/&&/abm/&&/movbe/&&/xsave/ {found=1} END {exit !found}'
|
echo CPU_FLAGS | awk '/avx/&&/avx2/&&/bmi1/&&/bmi2/&&/f16c/&&/fma/&&/abm/&&/movbe/&&/xsave/ {found=1} END {exit !found}'
|
||||||
then
|
then
|
||||||
PATTERNS+=('patterns-glibc-hwcaps-x86_64_v3')
|
detected_features+=('x86-64-v3')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Touchpad detection
|
# Touchpad detection
|
||||||
@ -296,7 +296,15 @@ fi
|
|||||||
# Package operations
|
# Package operations
|
||||||
|
|
||||||
echo "Setting up packages..."
|
echo "Setting up packages..."
|
||||||
|
|
||||||
sudo zypper --non-interactive in ${PATTERNS[@]}
|
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 rm ${RM[@]} ${AL[@]}
|
||||||
sudo zypper --non-interactive al ${AL[@]}
|
sudo zypper --non-interactive al ${AL[@]}
|
||||||
sudo zypper --non-interactive in ${IN[@]}
|
sudo zypper --non-interactive in ${IN[@]}
|
||||||
|
Loading…
Reference in New Issue
Block a user