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 pkglength="${#@}"
|
||||||
local accum=0
|
local accum=0
|
||||||
pen grey "Packages to install: $(pen green bold $pkglength)"
|
pen grey "Packages to install: $(pen green bold $pkglength)"
|
||||||
pkg-eval() {
|
# pkg-eval() {
|
||||||
for arg in "$@"; do
|
# for arg in "$@"; do
|
||||||
case "$arg" in
|
# case "$arg" in
|
||||||
check)
|
# check)
|
||||||
check "$@"
|
# check "$@"
|
||||||
;;
|
# ;;
|
||||||
err)
|
# err)
|
||||||
throw "$@"
|
# throw "$@"
|
||||||
;;
|
# ;;
|
||||||
spin)
|
# spin)
|
||||||
spin bold "$@"
|
# spin bold "$@"
|
||||||
;;
|
# ;;
|
||||||
esac
|
# esac
|
||||||
done
|
# done
|
||||||
}
|
# }
|
||||||
# if ! pen grey "Packages to install: $(pen green bold $pkglength)"; then
|
# if ! pen grey "Packages to install: $(pen green bold $pkglength)"; then
|
||||||
# exit 1
|
# exit 1
|
||||||
# fi
|
# fi
|
||||||
|
@ -151,10 +151,10 @@ check-and-install() {
|
||||||
((accum++))
|
((accum++))
|
||||||
local count="[${accum}/${pkglength}]"
|
local count="[${accum}/${pkglength}]"
|
||||||
if ! command-exists $pkg; then
|
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
|
if run --err err pkg-install $pkg; then
|
||||||
upclear
|
upclear
|
||||||
check "$(pen bold green Installed) $pkg $(pen bold yellow $count)"
|
check "$(pen bold green Installed) $pkg $(pen bold grey $count)"
|
||||||
else
|
else
|
||||||
upclear
|
upclear
|
||||||
throw "Something went wrong! Could not install $(pen bold red $pkg) $(pen bold yellow $count)"
|
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