]> git.rmz.io Git - dotfiles.git/blob - Makefile
6227781dc81712a27155b459e36cffd0e880bf0c
[dotfiles.git] / Makefile
1 APATH := $(realpath .)
2
3 FILES := bin
4 DOTFILES := conky* git* goobookrc msmtp* mutt ncmpcpp profile tmux.conf weechat Xresources xprofile zprofile zshenv zshrc
5 CONFIGFILES := aliases compton.conf git gnupg mimeo.conf mpd mpv offlineimap ranger retroarch systemd vim xbindkeys xkb zsh
6
7 .PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES)
8 install: $(FILES) $(DOTFILES) $(CONFIGFILES)
9
10 $(FILES):
11 @if [[ -e ~/$@ && ! -L ~/$@ ]]; then \
12 if [[ -d $@ ]]; then \
13 cp -r ~/$@/* $@; \
14 else \
15 cp -r ~/$@ $@; \
16 fi; \
17 rm -r ~/$@; \
18 fi;
19 ln -sfT $(APATH)/$@ ~/$@
20
21 $(DOTFILES):
22 @if [[ -e ~/.$@ && ! -L ~/.$@ ]]; then \
23 if [[ -d .$@ ]]; then \
24 cp -r ~/.$@/* $@; \
25 else \
26 cp -r ~/.$@ $@; \
27 fi; \
28 rm -r ~/.$@; \
29 fi;
30 ln -sfT $(APATH)/$@ ~/.$@
31
32 $(CONFIGFILES):
33 @if [[ -e ~/.config/$@ && ! -L ~/.config/$@ ]]; then \
34 if [[ -d .config/$@ ]]; then \
35 cp -r ~/.config/$@/* $@; \
36 else \
37 cp -r ~/.config/$@ $@; \
38 fi; \
39 rm -r ~/.config/$@; \
40 fi;
41 ln -sfT $(APATH)/$@ ~/.config/$@