install.fairie/home/.chezmoiscripts/universal/run_onchange_before_10-remove-bloatware.tmpl
Brian Zalewski a79c561e8d Update 22 files
- /home/.chezmoiscripts/_universal/run_onchange_before_11-install-docker.tmpl
- /home/.chezmoiscripts/_universal/run_onchange_before_05-install-homebrew.tmpl
- /home/.chezmoiscripts/_universal/run_onchange_before_10-remove-bloatware.tmpl
- /home/.chezmoiscripts/_universal/run_onchange_before_08-install-zx.tmpl
- /home/.chezmoiscripts/_universal/run_onchange_before_09-ensure-node-version.tmpl
- /home/.chezmoiscripts/universal/run_before_01-decrypt-age-key.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_11-install-docker.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_05-install-homebrew.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_10-remove-bloatware.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_08-install-zx.tmpl
- /home/.chezmoiscripts/universal/run_onchange_before_09-ensure-node-version.tmpl
- /home/.chezmoiscripts/centos/run_onchange_before_10-install-centos-dependencies.tmpl
- /home/.chezmoiscripts/centos/run_onchange_before_05-upgrade.tmpl
- /home/.chezmoiscripts/fedora/run_onchange_before_10-install-fedora-dependencies.tmpl
- /home/.chezmoitemplates/universal/common-dependencies
- /home/.chezmoitemplates/universal/profile-inline
- /home/.chezmoitemplates/ubuntu/common-dependencies
- /home/.chezmoitemplates/opensuse/common-dependencies
- /home/.chezmoitemplates/freebsd/common-dependencies
- /home/.chezmoitemplates/fedora/common-dependencies
- /home/.chezmoitemplates/debian/common-dependencies
- /home/.chezmoitemplates/archlinux/common-dependencies
2023-01-31 05:43:15 +00:00

43 lines
1.5 KiB
Cheetah

{{- if eq .host.distro.family "linux" -}}
#!/usr/bin/env bash
{{ includeTemplate "universal/profile-before" }}
{{ includeTemplate "universal/logg-before" }}
{{- $removePackages := join " " .removeLinuxPackages }}
### Remove bloatware packages defined in .chezmoidata.yaml
for PKG in {{ $removePackages }}; do
if command -v apk > /dev/null; then
if apk list "$PKG" | grep "$PKG" > /dev/null; then
sudo apk delete "$PKG"
fi
elif command -v apt-get > /dev/null; then
if dpkg -l "$PKG" | grep -E '^ii' > /dev/null; then
sudo apt-get remove -y "$PKG"
logg success 'Removed `'"$PKG"'` via apt-get'
fi
elif command -v dnf > /dev/null; then
if rpm -qa | grep "$PKG" > /dev/null; then
sudo dnf remove -y "$PKG"
logg success 'Removed `'"$PKG"'` via dnf'
fi
elif command -v yum > /dev/null; then
if rpm -qa | grep "$PKG" > /dev/null; then
sudo yum remove -y "$PKG"
logg success 'Removed `'"$PKG"'` via yum'
fi
elif command -v pacman > /dev/null; then
if pacman -Qs "$PKG" > /dev/null; then
sudo pacman -R "$PKG"
logg success 'Removed `'"$PKG"'` via pacman'
fi
elif command -v zypper > /dev/null; then
if rpm -qa | grep "$PKG" > /dev/null; then
sudo zypper remove -y "$PKG"
logg success 'Removed `'"$PKG"'` via zypper'
fi
fi
done
{{- end }}