From f63b27556d87f50a19147b4a295c712634442c46 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Thu, 6 Jun 2024 16:34:40 -0500 Subject: [PATCH] Update setup.sh --- setup.sh | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index 041d94c..d6ccd9d 100755 --- a/setup.sh +++ b/setup.sh @@ -79,7 +79,7 @@ checkEnv() { installDepend() { ## Check for dependencies. - DEPENDENCIES='bash bash-completion tar neovim bat tree multitail fastfetch' + DEPENDENCIES='bash bash-completion tar tree multitail fastfetch tldr trash-cli' echo -e "${YELLOW}Installing dependencies...${RC}" if [[ $PACKAGER == "pacman" ]]; then if ! command_exists yay && ! command_exists paru; then @@ -135,8 +135,28 @@ installZoxide() { } install_additional_dependencies() { - sudo apt update - sudo apt install -y trash-cli bat meld jpico + case $(command -v apt || command -v zypper || command -v dnf || command -v pacman) in + *apt) + sudo apt update + sudo apt install -y neovim bat + ;; + *zypper) + sudo zypper refresh + sudo zypper install -y neovim bat + ;; + *dnf) + sudo dnf check-update + sudo dnf install -y neovim bat + ;; + *pacman) + sudo pacman -Syu + sudo pacman -S --noconfirm neovim bat + ;; + *) + echo "No supported package manager found. Please install neovim and bat manually." + exit 1 + ;; + esac } linkConfig() { @@ -168,4 +188,4 @@ if linkConfig; then echo -e "${GREEN}Done!\nrestart your shell to see the changes.${RC}" else echo -e "${RED}Something went wrong!${RC}" -fi +fi \ No newline at end of file