From 8cde542fba2ed602b0b3605dd6e3b6ad0ca3097e Mon Sep 17 00:00:00 2001 From: rokosun Date: Wed, 28 Sep 2022 14:46:14 +0200 Subject: [PATCH] Fix indentation --- fixes-package.install | 50 ++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/fixes-package.install b/fixes-package.install index b09c249..54c437f 100644 --- a/fixes-package.install +++ b/fixes-package.install @@ -1,40 +1,36 @@ 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 + 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 - echo "Warning: A restart is required to take effect" + 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" } 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 - 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 + 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 - echo "Warning: A restart is required to take effect" + 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" } pre_remove() { for line in 'QT_QPA_PLATFORMTHEME' 'QT_QUICK_CONTROLS_STYLE'; do - sed -i "/^\s*$line=/d" /etc/environment -done + sed -i "/^\s*$line=/d" /etc/environment + done - 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" + 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" }