Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add git as a dependency for scripts that use it #436

Merged
merged 5 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions tabs/applications-setup/dwmtitus-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -292,4 +292,4 @@ makeDWM
install_slstatus
install_nerd_font
clone_config_folders
configure_backgrounds
configure_backgrounds
28 changes: 14 additions & 14 deletions tabs/applications-setup/mybash-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,20 @@

gitpath="$HOME/.local/share/mybash"

cloneMyBash() {
# Check if the dir exists before attempting to clone into it.
if [ -d "$gitpath" ]; then
rm -rf "$gitpath"
fi
mkdir -p "$HOME/.local/share" # Only create the dir if it doesn't exist.
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
$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
$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
$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
$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.
Expand All @@ -35,6 +26,15 @@ installDepend() {
esac
}

cloneMyBash() {
# Check if the dir exists before attempting to clone into it.
if [ -d "$gitpath" ]; then
rm -rf "$gitpath"
fi
mkdir -p "$HOME/.local/share" # Only create the dir if it doesn't exist.
cd "$HOME" && git clone https://github.com/ChrisTitusTech/mybash.git "$gitpath"
}

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"
Expand Down Expand Up @@ -110,8 +110,8 @@ linkConfig() {

checkEnv
checkEscalationTool
cloneMyBash
installDepend
cloneMyBash
installFont
installStarshipAndFzf
installZoxide
Expand Down
10 changes: 5 additions & 5 deletions tabs/applications-setup/neovim-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -51,7 +51,7 @@ linkNeovimConfig() {

checkEnv
checkEscalationTool
cloneNeovim
installNeovim
cloneNeovim
backupNeovimConfig
linkNeovimConfig