Fix indentation

This commit is contained in:
Rokosun 2022-09-28 14:46:14 +02:00
parent eb7bac0566
commit 8cde542fba

View File

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