Use --needed flag in pacman install command to avoid reinstalling already installed packages

This commit is contained in:
2025-02-23 16:42:23 +00:00
parent c87e9f124f
commit 515e744b9a

View File

@@ -139,7 +139,7 @@ for prog in "${programs[@]}"; do
sudo dnf install -y "$prog"
;;
pacman)
sudo pacman -S --noconfirm "$prog"
sudo pacman -S --needed --noconfirm "$prog"
;;
esac
if [ $? -ne 0 ]; then