]> git.rmz.io Git - dotfiles.git/blob - Makefile
e0b39123e06590aad3c98a4508d844a4c0a1fc4a
[dotfiles.git] / Makefile
1 APATH := $(realpath .)
2
3 FILES := bin
4 DOTFILES := conky* goobookrc msmtp* mutt profile tmux.conf weechat Xresources xprofile
5 CONFIGFILES := aliases compton.conf git gnupg mpv offlineimap ranger retroarch systemd vim xbindkeys xkb
6
7 .PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES)
8 install: $(FILES) $(DOTFILES) $(CONFIGFILES)
9
10 mpd:
11 ln -sfT $(APATH)/mpd ~/.config/mpd
12 mkdir -p ~/.local/share/mpd/playlists
13 .PHONY: mpd
14
15 ncmpcpp:
16 ln -sfT $(APATH)/ncmpcpp ~/.config/ncmpcpp
17 mkdir -p ~/.local/share/mpd/lyrics
18 .PHONY: ncmpcpp
19
20 zsh:
21 ln -sfT $(APATH)/zshrc ~/.zshrc
22 ln -sfT $(APATH)/zprofile ~/.zprofile
23 ln -sfT $(APATH)/zshenv ~/.zshenv
24 ln -sfT $(APATH)/zsh ~/.config/zsh
25 mkdir -p ~/.cache/zsh
26 .PHONY: zsh
27
28 xprofile:
29 ln -sfT $(APATH)/xprofile ~/.xprofile
30 .PHONY: xprofile
31
32 dircolors:
33 ln -sfT $(APATH)/dircolors ~/.config/dircolors
34 .PHONY: dircolors
35
36 $(FILES):
37 @if [[ -e ~/$@ && ! -L ~/$@ ]]; then \
38 if [[ -d $@ ]]; then \
39 cp -r ~/$@/* $@; \
40 else \
41 cp -r ~/$@ $@; \
42 fi; \
43 rm -r ~/$@; \
44 fi;
45 ln -sfT $(APATH)/$@ ~/$@
46
47 $(DOTFILES):
48 @if [[ -e ~/.$@ && ! -L ~/.$@ ]]; then \
49 if [[ -d .$@ ]]; then \
50 cp -r ~/.$@/* $@; \
51 else \
52 cp -r ~/.$@ $@; \
53 fi; \
54 rm -r ~/.$@; \
55 fi;
56 ln -sfT $(APATH)/$@ ~/.$@
57
58 $(CONFIGFILES):
59 @if [[ -e ~/.config/$@ && ! -L ~/.config/$@ ]]; then \
60 if [[ -d .config/$@ ]]; then \
61 cp -r ~/.config/$@/* $@; \
62 else \
63 cp -r ~/.config/$@ $@; \
64 fi; \
65 rm -r ~/.config/$@; \
66 fi;
67 ln -sfT $(APATH)/$@ ~/.config/$@