This commit is contained in:
pika 2025-05-22 15:02:54 +02:00
parent 637dcc05a2
commit 96aa330611

12
test.sh
View file

@ -36,7 +36,7 @@ spin-get-dependencies() {
depsArch=(bash zsh curl git neofetch waybar wlogout) depsArch=(bash zsh curl git neofetch waybar wlogout)
depsAlpine=(bash zsh curl git neofetch waybar wlogout) depsAlpine=(bash zsh curl git neofetch waybar wlogout)
declare -A deplist # declare -A deplist
local deplist=() local deplist=()
declare -A deps=( declare -A deps=(
@ -58,11 +58,13 @@ spin-get-dependencies() {
debian | ubuntu | arch | fedora | alpine | opensuse) debian | ubuntu | arch | fedora | alpine | opensuse)
for pkg in "${pkgArray[@]}"; do for pkg in "${pkgArray[@]}"; do
if ! command_exists $pkg; then if ! command_exists $pkg; then
deplist+="$pkg " deplist+=$(printf "%d\n" "$pkg")
fi fi
done done
pkglist="${deplist[@]}" pkglist+="${deplist[@]}"
echo "${pkglist[*]}"
;; ;;
*) *)
echo_error "There are no dependencies to install for $distro" echo_error "There are no dependencies to install for $distro"
@ -81,7 +83,9 @@ main() {
else else
check "Dependency list generated!" check "Dependency list generated!"
spin bold yellow "Installing packagelist.. ${pkglist[@]}" spin bold yellow "Installing packagelist.. ${pkglist[*]}"
sleep 3
if run --err err pkg-install "${pkglist[*]}"; then if run --err err pkg-install "${pkglist[*]}"; then
check "Installed packages!" check "Installed packages!"
else else