install, i dislike… but can propose:
#!/usr/bin/bash
[[ "$(pacman-conf | awk -F '= ' '/^Architecture/ {print $2}')" != 'x86_64' ]] && exit 0
branch=$(pacman-conf -r core | awk -F'/' '/^Server/ {$(NF=NF-2); print ($NF);exit}')
declare -a eol=($(curl -Ls "https://forum.manjaro.org/c/announcements/${branch}-updates.rss" | awk -F'>| ' '/\[EOL\]/ {print " "$2}' | sort | uniq))
#echo " ${eol[*]}" # not usefull if EOL is not installed
propose(){
declare -a good=($(curl -s "https://gitlab.manjaro.org/applications/manjaro-settings-manager/-/raw/master/src/libmsm/KernelModel.cpp" | awk '/<< "linux.*/ { gsub(/"|;/,"",$NF);print $NF}'))
echo "Last LTS is ${good[0]}"
[[ "${good[0]}" != "${good[1]}" ]] && echo "Recommanded LTS is ${good[1]}"
}
# compare to mhwd-kernels -li
declare -a installed=($(mhwd-kernel -li | awk '/* / {print $2}'))
#installed=(linux510 linux512 linux514) # result example
for k in "${installed[@]}"; do
if [[ $(printf "%s\n" "${eol[@]}"|grep ^$k$ -c) > 0 ]]; then
# oops linux512 is in EOL list
echo "Warning: kernel $k installed but is EOL"
propose
fi
done
result:
Warning: kernel linux512 installed but is EOL
Last LTS is linux510
EDIT: add detect branch for read good subjects