This commit is contained in:
pika 2025-05-23 20:34:07 +02:00
parent 03ccb7cab6
commit 478354f0c9

View file

@ -142,12 +142,13 @@ check-and-install() {
# ─< else go though the list of items and do the same >─────────────────────────────────── # ─< else go though the list of items and do the same >───────────────────────────────────
pen grey "Packages to install: $(pen green bold $pkgs)" pen grey "Packages to install: $(pen green bold $pkgs)"
for pkg in "$@"; do for pkg in "$@"; do
upclear
if ! command-exists $pkg; then if ! command-exists $pkg; then
spin bold "$(pen bold yellow Installing) $pkg" spin bold "$(pen bold yellow Installing) $pkg"
if run --err err pkg-install $pkg; then if run --err err pkg-install $pkg; then
upclear
check "$(pen bold green Installed) $pkg" check "$(pen bold green Installed) $pkg"
else else
upclear
throw "Something went wrong! Could not install $(pen bold red $pkg)" throw "Something went wrong! Could not install $(pen bold red $pkg)"
echo-error "${err:-}" echo-error "${err:-}"
fi fi