wip
This commit is contained in:
parent
9e70e386b6
commit
8accc54559
1 changed files with 4 additions and 26 deletions
30
dream.sh
30
dream.sh
|
@ -122,36 +122,14 @@ 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 pkg=$1
|
||||
# echo "DEBUG:: GOT ARRAY :: ${@}"
|
||||
# INFO: if it's not a list, then just check and install the package..
|
||||
#
|
||||
# if [[ -z $2 ]]; then
|
||||
# spin bold yellow "Installing $pkg"
|
||||
# if ! command-exists "$pkg"; then
|
||||
# if run --err err pkg-install "$pkg"; then
|
||||
# upclear
|
||||
# check bold "$(pen green bold 'Installed') $pkg"
|
||||
# else
|
||||
# upclear
|
||||
# throw "Something went wrong! Could not install $(pen bold red $pkg)"
|
||||
# echo-error "${err:-}"
|
||||
# fi
|
||||
# else
|
||||
# upclear
|
||||
# check bold "$pkg $(pen grey bold 'was already installed')"
|
||||
# # echo_pkg deps "skipping $pkg - as it's ${RED}already installed.."
|
||||
# fi
|
||||
# else
|
||||
local pkglength="${#@}"
|
||||
# ─< else go though the list of items and do the same >───────────────────────────────────
|
||||
# if ! pen grey "Packages to install: $(pen green bold $pkglength)"; then
|
||||
# exit 1
|
||||
# fi
|
||||
pen grey "Packages to install: $(pen green bold $pkglength)"
|
||||
for a in "$@"; do
|
||||
pen red bold "DEBUG: $a"
|
||||
done
|
||||
# for a in "$@"; do
|
||||
# pen red bold "DEBUG: $a"
|
||||
# done
|
||||
line
|
||||
for pkg in "$@"; do
|
||||
if ! command-exists $pkg; then
|
||||
|
@ -168,8 +146,8 @@ check-and-install() {
|
|||
upclear
|
||||
check bold "$pkg $(pen grey bold 'was already installed')"
|
||||
fi
|
||||
sleep 0.001
|
||||
done
|
||||
# fi
|
||||
}
|
||||
|
||||
# ─< Check if the user is root and set sudo variable if necessary >───────────────────────
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue