This commit is contained in:
pika 2025-05-22 13:06:51 +02:00
parent 963151c7ee
commit 637dcc05a2

21
test.sh
View file

@ -6,7 +6,7 @@ command_exists() {
} }
source-script() { source-script() {
local url="https://git.k4li.de/scripts/beddu/raw/branch/main/dist/beddu.sh" local url="$1"
local import="$(mktemp)" local import="$(mktemp)"
if command_exists curl; then if command_exists curl; then
curl -fsSL $url -o $import curl -fsSL $url -o $import
@ -30,18 +30,18 @@ spin-get-dependencies() {
# │ You can define dependencies for various linux distros here. It will │ # │ You can define dependencies for various linux distros here. It will │
# │ automagically be pulled via the $pkgArray[$distro] variable │ # │ automagically be pulled via the $pkgArray[$distro] variable │
# ╰─────────────────────────────────────────────────────────────────────────╯ # ╰─────────────────────────────────────────────────────────────────────────╯
depsDebian=() depsDebian=(bash zsh curl git neofetch waybar wlogout)
depsFedora=() depsFedora=(bash zsh curl git neofetch waybar wlogout)
depsOpensuse=() depsOpensuse=(bash zsh curl git neofetch waybar wlogout)
depsArch=() depsArch=(bash zsh curl git neofetch waybar wlogout)
depsAlpine=() depsAlpine=(bash zsh curl git neofetch waybar wlogout)
declare -A deplist declare -A deplist
local deplist=() local deplist=()
declare -A deps=( declare -A deps=(
[debian]="depsDebian" [debian]="depsDebian"
[ubuntu]="depsUbuntu" [ubuntu]="depsDebian"
[fedora]="depsFedora" [fedora]="depsFedora"
[arch]="depsArch" [arch]="depsArch"
[alpine]="depsAlpine" [alpine]="depsAlpine"
@ -58,7 +58,7 @@ 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+="$pkg "
fi fi
done done
@ -118,7 +118,10 @@ main() {
} }
if source-script; then beddu=https://git.k4li.de/scripts/beddu/raw/branch/main/dist/beddu.sh
pika=https://git.k4li.de/scripts/imports/raw/branch/main/distros.sh
if source-script $pika && source-script $beddu; then
# ─< package variable >─────────────────────────────────────────────────────────────────── # ─< package variable >───────────────────────────────────────────────────────────────────
unset PACKAGE unset PACKAGE