[util-iso-image] remove double line when only styles get installed

This commit is contained in:
Philip 2016-08-03 07:11:16 +02:00
parent f8d5fe7d52
commit 3b5254e523

View file

@ -66,9 +66,11 @@ configure_environment(){
cinnamon*|deepin*|gnome|i3|lxde|mate|netbook|openbox|pantheon|xfce*)
echo "QT_STYLE_OVERRIDE=gtk" >> $1/etc/environment
if [[ -f "$1/usr/lib/qt/plugins/platformthemes/libqt5ct.so" ]];then
sed -i 's|QT_STYLE_OVERRIDE=gtk|QT_QPA_PLATFORMTHEME=qt5ct|g' $1/etc/environment
sed -i '/QT_STYLE_OVERRIDE=gtk/d' $1/etc/environment
echo "QT_STYLE_OVERRIDE=gtk2" >> $1/etc/environment
fi
if [[ -f "$1/usr/lib/qt/plugins/styles/libqgtk2style.so" ]];then
sed -i '/QT_STYLE_OVERRIDE=gtk/d' $1/etc/environment
echo "QT_STYLE_OVERRIDE=gtk2" >> $1/etc/environment
fi
;;