From 075b54f5fb39f73c5460c1e6aa32695ab7d91333 Mon Sep 17 00:00:00 2001 From: Nyx <144965845+nnyyxxxx@users.noreply.github.com> Date: Wed, 18 Sep 2024 14:38:36 -0400 Subject: [PATCH] Add git as a dependency for scripts that use it (#436) * Add git as a dependency for scripts that use it * apt -> apt|nala * Refactor the remaining apt-gets and add nala to them * Remove refactored apts from this PR --------- Co-authored-by: nnyyxxxx Co-authored-by: Chris Titus --- tabs/applications-setup/dwmtitus-setup.sh | 20 +++++----- tabs/applications-setup/mybash-setup.sh | 46 +++++++++++------------ tabs/applications-setup/neovim-setup.sh | 10 ++--- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/tabs/applications-setup/dwmtitus-setup.sh b/tabs/applications-setup/dwmtitus-setup.sh index 9017639d..9ae23445 100755 --- a/tabs/applications-setup/dwmtitus-setup.sh +++ b/tabs/applications-setup/dwmtitus-setup.sh @@ -2,21 +2,14 @@ . ../common-script.sh -makeDWM() { - cd "$HOME" && git clone https://github.com/ChrisTitusTech/dwm-titus.git # CD to Home directory to install dwm-titus - # This path can be changed (e.g. to linux-toolbox directory) - cd dwm-titus/ # Hardcoded path, maybe not the best. - $ESCALATION_TOOL make clean install # Run make clean install -} - setupDWM() { printf "%b\n" "${YELLOW}Installing DWM-Titus if not already installed${RC}" case "$PACKAGER" in # Install pre-Requisites pacman) - $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 libxcb + $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 libxcb git ;; apt-get|nala) - $ESCALATION_TOOL "$PACKAGER" install -y build-essential libx11-dev libxinerama-dev libxft-dev libimlib2-dev libx11-xcb-dev libfontconfig1 libx11-6 libxft2 libxinerama1 libxcb-res0-dev + $ESCALATION_TOOL "$PACKAGER" install -y build-essential libx11-dev libxinerama-dev libxft-dev libimlib2-dev libx11-xcb-dev libfontconfig1 libx11-6 libxft2 libxinerama1 libxcb-res0-dev git ;; dnf) $ESCALATION_TOOL "$PACKAGER" groupinstall -y "Development Tools" @@ -29,6 +22,13 @@ setupDWM() { esac } +makeDWM() { + cd "$HOME" && git clone https://github.com/ChrisTitusTech/dwm-titus.git # CD to Home directory to install dwm-titus + # This path can be changed (e.g. to linux-toolbox directory) + cd dwm-titus/ # Hardcoded path, maybe not the best. + $ESCALATION_TOOL make clean install # Run make clean install +} + install_nerd_font() { FONT_DIR="$HOME/.local/share/fonts" FONT_ZIP="$FONT_DIR/Meslo.zip" @@ -292,4 +292,4 @@ makeDWM install_slstatus install_nerd_font clone_config_folders -configure_backgrounds +configure_backgrounds \ No newline at end of file diff --git a/tabs/applications-setup/mybash-setup.sh b/tabs/applications-setup/mybash-setup.sh index 380f1e2b..7449072a 100644 --- a/tabs/applications-setup/mybash-setup.sh +++ b/tabs/applications-setup/mybash-setup.sh @@ -4,6 +4,28 @@ gitpath="$HOME/.local/share/mybash" +installDepend() { + printf "%b\n" "${YELLOW}Installing Bash...${RC}" + case "$PACKAGER" in + pacman) + $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm bash bash-completion tar bat tree unzip fontconfig git + ;; + apt) + $ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git + ;; + dnf) + $ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git + ;; + zypper) + $ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig git + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}" # The packages above were grabbed out of the original mybash-setup-script. + exit 1 + ;; + esac +} + cloneMyBash() { # Check if the dir exists before attempting to clone into it. if [ -d "$gitpath" ]; then @@ -13,28 +35,6 @@ cloneMyBash() { cd "$HOME" && git clone https://github.com/ChrisTitusTech/mybash.git "$gitpath" } -installDepend() { - printf "%b\n" "${YELLOW}Installing Bash...${RC}" - case "$PACKAGER" in - pacman) - $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm bash bash-completion tar bat tree unzip fontconfig - ;; - apt) - $ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig - ;; - dnf) - $ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig - ;; - zypper) - $ESCALATION_TOOL "$PACKAGER" install -y bash bash-completion tar bat tree unzip fontconfig - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}" # The packages above were grabbed out of the original mybash-setup-script. - exit 1 - ;; - esac -} - installFont() { # Check to see if the MesloLGS Nerd Font is installed (Change this to whatever font you would like) FONT_NAME="MesloLGS Nerd Font Mono" @@ -110,8 +110,8 @@ linkConfig() { checkEnv checkEscalationTool -cloneMyBash installDepend +cloneMyBash installFont installStarshipAndFzf installZoxide diff --git a/tabs/applications-setup/neovim-setup.sh b/tabs/applications-setup/neovim-setup.sh index 826fd538..36d43c88 100755 --- a/tabs/applications-setup/neovim-setup.sh +++ b/tabs/applications-setup/neovim-setup.sh @@ -17,16 +17,16 @@ installNeovim() { printf "%b\n" "${YELLOW}Installing Neovim...${RC}" case "$PACKAGER" in pacman) - $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck + $ESCALATION_TOOL "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck git ;; apt) - $ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fd-find python3-venv luarocks golang-go shellcheck + $ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fd-find python3-venv luarocks golang-go shellcheck git ;; dnf) - $ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck + $ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git ;; zypper) - $ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck + $ESCALATION_TOOL "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git ;; *) printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}" # The packages above were grabbed out of the original nvim-setup-script. @@ -51,7 +51,7 @@ linkNeovimConfig() { checkEnv checkEscalationTool -cloneNeovim installNeovim +cloneNeovim backupNeovimConfig linkNeovimConfig \ No newline at end of file