dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | README | LICENSE

commit edd95910d459fffbc3da0431487790041caf51a7 (patch)
parent 8b0b78c80ae8fc98f1b6d049c20a9de0460a92f8
Author: Alex Karle <alex@alexkarle.com>
Date:   Mon, 21 Feb 2022 19:44:49 -0500

make: Add `install` recipe for easy setup

It doesn't clear out any old symlinks, so it won't help
migrate from old systems to new systems, but it'll help on
purely new installs!

Diffstat:
MMakefile | 23++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -1,3 +1,24 @@ -# Makefile -- to compile binary config files +# Makefile -- to compile and install dotfiles +ALL = .cwmrc .exrc .gitconfig .mbsyncrc .shrc .tmux.conf .xsession \ + .mailcap .muttrc .config/nvim .mblaze + +# CURDIR is gmake, .CURDIR is bmake. One will exist! +DOTS = $(CURDIR)$(.CURDIR) + +.PHONY: build +build: .mblaze/mless + .mblaze/mless: .mblaze/mless.in lesskey -o $@ .mblaze/mless.in + +.PHONY: install +install: build + @mkdir -p $$HOME/.config + @for f in $(ALL); do \ + if [ -e "$$HOME/$$f" ]; then \ + echo "Up to date: $$f" 1>&2; \ + else \ + echo "Installed: $$HOME/$$f -> $(DOTS)/$$f"; \ + ln -s "$(DOTS)/$$f" "$$HOME/$$f"; \ + fi \ + done