break it while wip
This commit is contained in:
parent
279fa70a9c
commit
d2eba8d901
1 changed files with 19 additions and 3 deletions
22
dream.sh
22
dream.sh
|
@ -124,19 +124,35 @@ run-silent() {
|
||||||
check-and-install() {
|
check-and-install() {
|
||||||
local pkglength="${#@}"
|
local pkglength="${#@}"
|
||||||
local accum=0
|
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
|
||||||
|
}
|
||||||
# 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
|
||||||
pen grey "Packages to install: $(pen green bold $pkglength)"
|
|
||||||
# for a in "$@"; do
|
# for a in "$@"; do
|
||||||
# pen red bold "DEBUG: $a"
|
# pen red bold "DEBUG: $a"
|
||||||
# done
|
# done
|
||||||
line
|
line
|
||||||
for pkg in "$@"; do
|
for pkg in "$@"; do
|
||||||
((accum++))
|
((accum++))
|
||||||
# local count="$(echo [${accum}/${pkglength}])"
|
local count="[${accum}/${pkglength}]"
|
||||||
|
echo "$count"
|
||||||
if ! command-exists $pkg; then
|
if ! command-exists $pkg; then
|
||||||
spin bold "$(pen bold green '${accum}/${pkglenght} Installed')"
|
pkg-eval spin "$(pen bold green '${accum}/${pkglenght} Installed')"
|
||||||
if run --err err pkg-install $pkg; then
|
if run --err err pkg-install $pkg; then
|
||||||
upclear
|
upclear
|
||||||
check "$(pen bold green ${accum}/${pkglenght} Installed) $pkg"
|
check "$(pen bold green ${accum}/${pkglenght} Installed) $pkg"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue