This commit is contained in:
piecka 2025-06-24 10:33:22 +02:00
parent 26275e72bb
commit b9f19840dd

View file

@ -13,7 +13,7 @@ source-script() {
if command-exists curl; then if command-exists curl; then
curl -fsSL $url -o $import curl -fsSL $url -o $import
elif command-exists wget; then elif command-exists wget; then
wget -o $import $url wget -O $import $url
else else
echo "curl/wget is required, but missing.." echo "curl/wget is required, but missing.."
exit 69 exit 69
@ -70,6 +70,7 @@ get-dependencies() {
"tldr" "tldr"
"oh-my-posh" "oh-my-posh"
"eza" "eza"
"dog"
"ytui-bin" "ytui-bin"
) )
depsAlpine=() depsAlpine=()
@ -90,13 +91,21 @@ get-dependencies() {
# #
declare -n pkgArray="${deps[$distro]}" declare -n pkgArray="${deps[$distro]}"
local pkg pkglist=()
case "$distro" in case "$distro" in
debian | ubuntu | arch | fedora | alpine | opensuse) debian | ubuntu | arch | fedora | alpine | opensuse)
pen bold blue "Installing base packages.." pen bold blue "Getting package counter.."
check-and-install ${generalDeps[@]} for pkg in "${generalDeps[@]} ${pkgArray[@]}"; do
if ! command-exists $pkg; then
pkglist=("$pkg")
fi
done
check-and-install ${pkgArray[@]} check "Done getting packages"
check-and-install "${pkglist[@]}"
;; ;;
*) *)
echo-error "There are no dependencies to install for $distro" echo-error "There are no dependencies to install for $distro"