diff --git a/test.sh b/test.sh index fc9c204..b1ea364 100755 --- a/test.sh +++ b/test.sh @@ -33,11 +33,11 @@ spin-get-dependencies() { # │ You can define dependencies for various linux distros here. It will │ # │ automagically be pulled via the $pkgArray[$distro] variable │ # ╰─────────────────────────────────────────────────────────────────────────╯ - depsDebian=(bash zsh curl git neofetch waybar wlogout) - depsFedora=(bash zsh curl git neofetch waybar wlogout) - depsOpensuse=(bash zsh curl git neofetch waybar wlogout) - depsArch=(bash zsh curl git neofetch waybar wlogout firefox-esr) - depsAlpine=(bash zsh curl git neofetch waybar wlogout) + depsDebian=(git neofetch waybar wlogout g++ build-essentials) + depsFedora=(git neofetch waybar wlogout) + depsOpensuse=(git neofetch waybar wlogout) + depsArch=(git neofetch waybar wlogout firefox-esr base-devel) + depsAlpine=(git neofetch waybar wlogout) # declare -A deplist @@ -112,9 +112,7 @@ spin-get-dependencies() { main() { local err out - if ! spin-get-dependencies; then - throw "Dependencies could not get generated!" - else + if spin-get-dependencies; then check "Dependency list generated!" pen red bold "There are ${#deplist[@]} items to install.." # local pkgs="$@" @@ -133,7 +131,27 @@ main() { fi done done + check "debug" + else + throw "Dependencies could not get generated!" + exit 69 + fi + if confirm "Do you want to remove all installed packages?"; then + for pkg in "${deplist[@]}"; do + spin bold red "Removing $pkg" + if run --err err --out out pkg-remove "$pkg"; then + check "Removed $pkg" + line + else + check "$pkg could not get removed.." + echo_error "${err:-}" + echo_note "${out:-}" + line + continue + fi + done + check "debug" fi # case "$distro" in