minor tweaks
This commit is contained in:
parent
60db19dad7
commit
75ef83891e
1 changed files with 17 additions and 17 deletions
34
dream.sh
34
dream.sh
|
@ -125,21 +125,21 @@ check-and-install() {
|
|||
local pkglength="${#@}"
|
||||
local accum=0
|
||||
pen grey "Packages to install: $(pen green bold $pkglength)"
|
||||
pkg-eval() {
|
||||
for arg in "$@"; do
|
||||
case "$arg" in
|
||||
check)
|
||||
check "$@"
|
||||
;;
|
||||
err)
|
||||
throw "$@"
|
||||
;;
|
||||
spin)
|
||||
spin bold "$@"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
# pkg-eval() {
|
||||
# for arg in "$@"; do
|
||||
# case "$arg" in
|
||||
# check)
|
||||
# check "$@"
|
||||
# ;;
|
||||
# err)
|
||||
# throw "$@"
|
||||
# ;;
|
||||
# spin)
|
||||
# spin bold "$@"
|
||||
# ;;
|
||||
# esac
|
||||
# done
|
||||
# }
|
||||
# if ! pen grey "Packages to install: $(pen green bold $pkglength)"; then
|
||||
# exit 1
|
||||
# fi
|
||||
|
@ -151,10 +151,10 @@ check-and-install() {
|
|||
((accum++))
|
||||
local count="[${accum}/${pkglength}]"
|
||||
if ! command-exists $pkg; then
|
||||
spin bold "$(pen bold yellow Installing) $pkg $(pen bold green $count)"
|
||||
spin bold "$(pen bold yellow Installing) $pkg $(pen bold grey $count)"
|
||||
if run --err err pkg-install $pkg; then
|
||||
upclear
|
||||
check "$(pen bold green Installed) $pkg $(pen bold yellow $count)"
|
||||
check "$(pen bold green Installed) $pkg $(pen bold grey $count)"
|
||||
else
|
||||
upclear
|
||||
throw "Something went wrong! Could not install $(pen bold red $pkg) $(pen bold yellow $count)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue