fixes-package/fixes-package.install

37 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-09-18 15:29:15 +00:00
post_install() {
2022-09-28 12:46:14 +00:00
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
2022-09-28 12:24:11 +00:00
2022-09-28 12:46:14 +00:00
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"
2022-09-18 15:29:15 +00:00
}
post_upgrade() {
2022-09-28 12:46:14 +00:00
for line in 'QT_QPA_PLATFORMTHEME' 'QT_QUICK_CONTROLS_STYLE'; do
2022-09-28 12:24:11 +00:00
grep -q "^\s*$line=\"gtk2\"" /etc/environment || continue
2022-09-28 12:46:14 +00:00
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
2022-09-28 12:24:11 +00:00
2022-09-28 12:46:14 +00:00
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"
2022-09-18 15:29:15 +00:00
}
pre_remove() {
2022-09-28 12:29:32 +00:00
for line in 'QT_QPA_PLATFORMTHEME' 'QT_QUICK_CONTROLS_STYLE'; do
2022-09-28 12:46:14 +00:00
sed -i "/^\s*$line=/d" /etc/environment
done
2022-09-28 12:29:32 +00:00
2022-09-28 12:46:14 +00:00
find /usr/lib/systemd/user/ -name "fix-*.service" -type f -printf "%f\0" | xargs -0 systemctl --global disable
echo "Warning: A restart is required to take effect"
2022-09-18 15:29:15 +00:00
}