-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (31 loc) · 719 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (31 loc) · 719 Bytes
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
LOCAL_FILES =
DOTFILES = \
XCompose \
bashrc \
ncmpcpp \
lynxrc \
muttrc \
nethackrc \
rtorrent.rc \
tmux.conf \
vimrc \
inputrc \
config/user-dirs.dirs \
config/foot/foot.ini \
config/foot_scratchterm.ini \
config/i3status-rust/config.toml \
config/newsboat/config \
Xdefaults \
$(LOCAL_FILES)
DIR = $(DESTDIR)${HOME}
INSTALLED_FILES = $(addprefix $(DIR)/., $(DOTFILES))
BACKUPS = $(addsuffix .backup, $(INSTALLED_FILES))
install: $(INSTALLED_FILES)
$(addprefix $(DIR)/., tmux.local.conf muttrc.local) :
touch $@
$(DIR)/.% : %
@ if [ -e '$@' ] && ! diff -q '$@' '$^' > /dev/null; then \
mv -v $@ $@.backup; fi
@ mkdir -p `dirname $@`
@ ln -vsf '$(CURDIR)/$^' '$@'
.PHONY: install clean