diff --git a/postinstall.sh b/postinstall.sh index 38704cd..9017ebf 100644 --- a/postinstall.sh +++ b/postinstall.sh @@ -13,7 +13,7 @@ source-script() { if command-exists curl; then curl -fsSL $url -o $import elif command-exists wget; then - wget -o $import $url + wget -O $import $url else echo "curl/wget is required, but missing.." exit 69 @@ -70,6 +70,7 @@ get-dependencies() { "tldr" "oh-my-posh" "eza" + "dog" "ytui-bin" ) depsAlpine=() @@ -90,13 +91,21 @@ get-dependencies() { # declare -n pkgArray="${deps[$distro]}" + local pkg pkglist=() + case "$distro" in 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"