Files
Nomarchy/bin/nomarchy-pkg-aur-add
Bernardo Magri 33deeb494b initial commit
2026-04-01 17:06:01 +01:00

18 lines
455 B
Bash
Executable File

#!/bin/bash
# Add the named packages to the system from the AUR if they're missing. Returns false if it couldn't be done.
if nomarchy-pkg-missing "$@"; then
yay -S --noconfirm --needed "$@" || exit 1
fi
for pkg in "$@"; do
# Secondary check to handle states where pacman doesn't actually register an error
if ! pacman -Q "$pkg" &>/dev/null; then
echo -e "\033[31mError: Package '$pkg' did not install\033[0m" >&2
exit 1
fi
done
exit 0