diff --git a/packages/packages.sh b/packages/packages.sh index ab55350..39e27fe 100755 --- a/packages/packages.sh +++ b/packages/packages.sh @@ -20,6 +20,11 @@ yay_install() { if [ ! -z "${packages}" ]; then yay -S --noconfirm --needed ${packages} fi + for package in "$@"; do + if ! pacman -Q "${package}" >/dev/null 2>&1; then + return 1 # at least one of the packages has not been correctly installed! + fi + done return 0 }