7d0e87d9ea
- /home/.chezmoiscripts/ubuntu/run_onchange_before_10_install-ubuntu-dependencies.tmpl - /home/.chezmoiscripts/ubuntu/run_onchange_before_10-install-ubuntu-dependencies.tmpl - /home/.chezmoiscripts/_universal/run_onchange_before_10-remove-bloatware.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_85-remove-shortcuts.tmpl - /home/.chezmoidata.yaml
20 lines
No EOL
608 B
Cheetah
20 lines
No EOL
608 B
Cheetah
{{- if eq .host.distro.family "linux" -}}
|
|
#!/usr/bin/env bash
|
|
|
|
{{- $removePackages := splitList " " .removeLinuxPackages }}
|
|
|
|
### Remove bloatware packages defined in .chezmoidata.yaml
|
|
for PKG in {{ $removePackages }}; do
|
|
if command -v apt-get > /dev/null; then
|
|
if dpkg -l "$PKG" | grep "$PKG"; then
|
|
sudo apt-get remove -y "$PKG"
|
|
fi
|
|
elif command -v dnf > /dev/null; then
|
|
if
|
|
elif command -v yum > /dev/null; then
|
|
elif command -v pacman > /dev/null; then
|
|
if pacman -Qs "$PKG" > /dev/null; then
|
|
sudo pacman -R "$PKG"
|
|
fi
|
|
fi
|
|
done |