From 5dca62514497d6f12b1c117748ff747a28e375ef Mon Sep 17 00:00:00 2001 From: pika Date: Sat, 24 May 2025 01:33:11 +0200 Subject: [PATCH] wip --- dream.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dream.sh b/dream.sh index a4ffe14..d071518 100644 --- a/dream.sh +++ b/dream.sh @@ -123,6 +123,7 @@ run-silent() { # if given an array, it checks if the command is available, and if not - installs all packages in that array one by one check-and-install() { local pkglength="${#@}" + local accum=0 # if ! pen grey "Packages to install: $(pen green bold $pkglength)"; then # exit 1 # fi @@ -132,8 +133,9 @@ check-and-install() { # done line for pkg in "$@"; do + ((accum++)) if ! command-exists $pkg; then - spin bold "$(pen bold yellow Installing) $pkg" + spin bold "$(pen bold yellow \"Installing [${accum}/${pkglength}]\") $pkg" if run --err err pkg-install $pkg; then upclear check "$(pen bold green Installed) $pkg"