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"