feat: apt package filter
This commit is contained in:
@@ -13,9 +13,11 @@ if command -v apt-get &> /dev/null; then
|
||||
)
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
apt_packages=($(comm -13 <(printf "%s\n" "${apt_packages[@]}" | sort) <(dpkg --get-selections | awk '{print $1}' | sort)))
|
||||
if [ ${#apt_packages[@]} -gt 0 ]; then
|
||||
sudo apt-get install -qq "${apt_packages[@]}"
|
||||
sudo apt-get autoremove
|
||||
sudo apt-get autoclean
|
||||
fi
|
||||
|
||||
unset apt_packages
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user