Update 'fixes-package.install'

This commit is contained in:
Tio TROM 2022-09-28 14:24:11 +02:00
parent fd94f7ade8
commit f5395e7d93

View File

@ -1,9 +1,31 @@
post_install() { post_install() {
for line in 'QT_QPA_PLATFORMTHEME' 'QT_QUICK_CONTROLS_STYLE'; do
grep -q "^\s*$line=\"gtk2\"" /etc/environment || continue
if grep -q "^\s*$line=" /etc/environment; then
sed -i "s/^\s*$line=.*$/$line=\"gtk2\"" /etc/environment
else
echo "$line=\"gtk2\"" >> /etc/environment
fi
done
find /usr/lib/systemd/user/ -name "fix-*.service" -type f -printf "%f\0" | xargs -0 systemctl --global enable find /usr/lib/systemd/user/ -name "fix-*.service" -type f -printf "%f\0" | xargs -0 systemctl --global enable
echo "Warning: A restart is required to take effect" echo "Warning: A restart is required to take effect"
} }
post_upgrade() { post_upgrade() {
for line in 'QT_QPA_PLATFORMTHEME' 'QT_QUICK_CONTROLS_STYLE'; do
grep -q "^\s*$line=\"gtk2\"" /etc/environment || continue
if grep -q "^\s*$line=" /etc/environment; then
sed -i "s/^\s*$line=.*$/$line=\"gtk2\"" /etc/environment
else
echo "$line=\"gtk2\"" >> /etc/environment
fi
done
find /usr/lib/systemd/user/ -name "fix-*.service" -type f -printf "%f\0" | xargs -0 systemctl --global enable find /usr/lib/systemd/user/ -name "fix-*.service" -type f -printf "%f\0" | xargs -0 systemctl --global enable
echo "Warning: A restart is required to take effect" echo "Warning: A restart is required to take effect"
} }