Files
dotfiles/Makefile
T
2026-11-30 17:02:05 +01:00

36 lines
640 B
Makefile

# prefer this if stow is available
.PHONY: stow unstow
stow:
stow nvim ghostty emacs
unstow:
stow -D nvim ghostty emacs
# if stow is not available, symlink configs instead
# TODO: this is currently outdated
LN := ln -svf
LNDIR := ln -sv
DOTFILES_DIR := $(shell pwd)
TARGET_DIR := $(HOME)
.PHONY: link unlink
link: nvim
unlink: unnvim
.PHONY: nvim
nvim:
rm -rf $(TARGET_DIR)/.config/nvim
$(LNDIR) $(DOTFILES_DIR)/nvim/.config/nvim $(TARGET_DIR)/.config/nvim
.PHONY: unnvim
unnvim:
rm -rf $(TARGET_DIR)/.config/nvim
.PHONY: git
git:
rm -f $(TARGET_DIR)/.gitconfig
$(LN) $(DOTFILES_DIR)/git/.gitconfig $(TARGET_DIR)/.gitconfig