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