-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (30 loc) · 1.23 KB
/
Copy pathMakefile
File metadata and controls
38 lines (30 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
.PHONY: default install link unlink ensure_brew brew_bundle_install install_tmux_plugins help
default: help
install: brew_bundle_install link install_tmux_plugins
help:
@echo "Available targets:"
@echo " install - Run link, brew_bundle_install, and install_tmux_plugins"
@echo " link - Symlink dotfiles using stow (--adopt mode)"
@echo " unlink - Remove dotfile symlinks"
@echo " ensure_brew - Check if Homebrew is installed, install if missing"
@echo " brew_bundle_install - Install Homebrew packages from Brewfile"
@echo " install_tmux_plugins - Install TPM (Tmux Plugin Manager)"
link:
stow --adopt --target ~ home
unlink:
stow --delete --target ~ home
ensure_brew:
@if ! command -v brew >/dev/null 2>&1; then \
echo "Homebrew not found. Installing Homebrew..."; \
/bin/bash -c "$$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"; \
else \
echo "Homebrew is already installed"; \
fi
brew_bundle_install: ensure_brew
brew bundle install --file=./home/.Brewfile
install_tmux_plugins:
@if [ ! -d ~/.tmux/plugins/tpm ]; then \
git clone "https://github.com/tmux-plugins/tpm" ~/.tmux/plugins/tpm; \
else \
echo "TPM already installed"; \
fi