diff --git a/test.sh b/test.sh index 94bd6a8..b0d30ae 100755 --- a/test.sh +++ b/test.sh @@ -111,15 +111,26 @@ spin-installation() { } main() { - local err + local err out if ! spin-get-dependencies; then throw "Dependencies could not get generated!" else check "Dependency list generated!" - pen red bold "There are ${#pkglist[@]} items to install.." - for p in "${pkglist[@]}"; do - echo "Package: $p" + pen red bold "There are ${#deplist[@]} items to install.." + # local pkgs="$@" + + for pkg in "${deplist[@]}"; do + spin bold yellow "Installing $pkg" + if run --err err --out out pkg-install "$pkg"; then + check "Installed $pkg" + line + else + throw "$pkg could not get installed.." + echo_error "${err:-}" + echo_note "${out:-}" + line + fi done fi @@ -149,6 +160,7 @@ main() { # esac # source_script "https://git.k4li.de/scripts/beddu/raw/branch/main/dist/beddu.sh" + check "Complete!" } beddu=https://git.k4li.de/scripts/beddu/raw/branch/main/dist/beddu.sh