fix: prevent error if plasmax11.desktop is missing

Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
This commit is contained in:
2025-06-09 22:17:11 +05:00
parent 14b48e7e2e
commit e9b7dc3759

View File

@ -66,8 +66,11 @@ if [[ -z $SENTINEL_CREATED ]]; then
export SENTINEL_CREATED=1
fi
if [[ $(grep -E '^X-KDE-PluginInfo-Version=' /usr/share/xsessions/plasmax11.desktop | cut -d'=' -f2) =~ 6.* ]] ; then
KDE6="true"
if [[ -f /usr/share/xsessions/plasmax11.desktop ]]; then
version=$(grep -E '^X-KDE-PluginInfo-Version=' /usr/share/xsessions/plasmax11.desktop | cut -d'=' -f2)
if [[ $version =~ ^6.* ]]; then
KDE6="true"
fi
fi
case "$session" in