mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Add verification to omarchy-pkg-add and speed up installs
This commit is contained in:
@@ -1,8 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo pacman -S --noconfirm --needed "$@" || exit 1
|
||||||
|
|
||||||
for pkg in "$@"; do
|
for pkg in "$@"; do
|
||||||
|
# Secondary check to handle states where pacman doesn't actually register an error
|
||||||
if ! pacman -Q "$pkg" &>/dev/null; then
|
if ! pacman -Q "$pkg" &>/dev/null; then
|
||||||
sudo pacman -S --noconfirm "$pkg" || exit 1
|
echo -e "\033[31mError: Package '$pkg' did not install\033[0m" >&2
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user