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 30a1a3e3a2
commit 78132d0591

View File

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