From 9944474ae6e2c5d90ea544b4f1a249cfa9438153 Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Mon, 19 Feb 2018 09:34:50 +0100 Subject: [PATCH] Double-check that all packages have been installed when using yay. --- packages/packages.sh | 5 +++++ 1 file changed, 5 insertions(+) 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 }