diff --git a/Makefile b/Makefile index 1057ee4..fe4cbea 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,26 @@ -mac: +brew: + /bin/bash -c "$$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + + +brewdeps: brew + brew install \ + bat \ + exa \ + fd \ + fzf \ + make \ + neovim \ + ripgrep \ + stow \ + tmux + + +tpm: + -git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm + + +mac: brewdeps tpm make -f ./makefiles/mac.mk all -ubuntu: +ubuntu: brewdeps tpm make -f ./makefiles/ubuntu.mk all diff --git a/makefiles/mac.mk b/makefiles/mac.mk index 4c74d2a..fb3021d 100644 --- a/makefiles/mac.mk +++ b/makefiles/mac.mk @@ -1,36 +1,17 @@ NVIM_HOME := $(shell echo $${XDG_DATA_HOME:-$$HOME/.local/share}) - -stow: - brew install stow - - -ripgrep: - brew install ripgrep - - -fd: - brew install fd - - INIT_DIR := $(HOME)/.config/nvim - -vim: stow ripgrep fd - brew install neovim make +vim: stow -t ~ --ignore=ftplugin vim mkdir -p $(INIT_DIR) stow -t $(INIT_DIR) vim -tmux-install: - brew install tmux - - -tpm: tmux-install +tpm: -git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm -tmux-conf: stow tpm +tmux-conf: stow -t ~ tmux tmux start-server tmux new-session -d @@ -38,11 +19,11 @@ tmux-conf: stow tpm tmux kill-server -gitconfig: stow +gitconfig: stow --adopt -t ~ git -intellij: stow +intellij: stow -t ~ intellij diff --git a/makefiles/ubuntu.mk b/makefiles/ubuntu.mk index 900223e..183f61c 100644 --- a/makefiles/ubuntu.mk +++ b/makefiles/ubuntu.mk @@ -1,38 +1,13 @@ NVIM_HOME := $(shell echo $${XDG_DATA_HOME:-$$HOME/.local/share}) - -stow: - sudo apt-get install -y stow - - -ripgrep: - curl -LO https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb - sudo dpkg -i ripgrep_13.0.0_amd64.deb - - -fd: - sudo apt-get install -y fd-find - - INIT_DIR := $(HOME)/.config/nvim -vim: stow ripgrep fd - sudo apt-get install -y build-essential git - curl -L -o nvim-linux64.deb https://github.com/neovim/neovim/releases/download/v0.7.0/nvim-linux64.deb - sudo apt install ./nvim-linux64.deb +vim: stow -t ~ --ignore=ftplugin vim mkdir -p $(INIT_DIR) stow -t $(INIT_DIR) vim -tmux-install: - sudo apt-get install -y tmux - - -tpm: tmux-install - -git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm - - -tmux-conf: stow tpm +tmux-conf: tpm stow -t ~ tmux tmux start-server tmux new-session -d @@ -40,11 +15,11 @@ tmux-conf: stow tpm tmux kill-server -gitconfig: stow +gitconfig: stow -t ~ git -intellij: stow +intellij: stow -t ~ intellij