-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathMakefile
126 lines (106 loc) · 3.91 KB
/
Makefile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
YELLOW = $$(tput setaf 226)
GREEN = $$(tput setaf 46)
RED = $$(tput setaf 196)
RESET = $$(tput sgr0)
ifeq ($(OS),Windows_NT)
UNAME = Windows
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
UNAME = Linux
endif
ifeq ($(UNAME_S),Darwin)
UNAME = OSX
endif
UNAME ?= Other
endif
install:
@make $(UNAME)
OSX: bash git news utils zsh bin vim tmux cmus neovim sc-im
Linux: bash git news utils zsh bin vim tmux cmus neovim sc-im alacritty i3 vf1
Other: bash git utils zsh vim cmus surfraw
clean:
@printf "$(RED)--- clean -----------------------------------------------\n$(RESET)"
stow -t "$$HOME" -D bash
stow -t "$$HOME" -D git
stow -t "$$HOME" -D newsbeuter
stow -t "$$HOME" -D utils
stow -t "$$HOME" -D zsh
stow -t "$$HOME/bin" -D bin
stow -t "$$HOME" -D vim
stow -t "$$HOME/.config/nvim/" -D neovim
stow -t "$$HOME" -D tmux
stow -t "$$HOME/.cmus/" -D cmus
stow -t "$$HOME/.config/i3/" -D i3
stow -t "$$HOME" -D i3status
stow -t "$$HOME" -D alacritty
stow -t "$$HOME" -D vf1
bash:
@printf "$(YELLOW)--- bash ------------------------------------------------\n$(RESET)"
stow -t "$$HOME" bash
alacritty:
@printf "$(YELLOW)--- alacritty -------------------------------------------\n$(RESET)"
mkdir -p "$$HOME/.config/alacritty"
stow -t "$$HOME/.config/alacritty" alacritty
git:
@printf "$(YELLOW)--- git -------------------------------------------------\n$(RESET)"
stow -t "$$HOME" git
news:
@printf "$(YELLOW)--- news ------------------------------------------------\n$(RESET)"
stow -t "$$HOME" newsbeuter
utils:
@printf "$(YELLOW)--- utils -----------------------------------------------\n$(RESET)"
stow -t "$$HOME" utils
zsh:
@printf "$(YELLOW)--- zsh -------------------------------------------------\n$(RESET)"
stow -t "$$HOME" zsh
i3:
@printf "$(YELLOW)--- i3 --------------------------------------------------\n$(RESET)"
mkdir -p "$$HOME/.config/i3"
stow -t "$$HOME/.config/i3/" i3
stow -t "$$HOME" i3status
mutt:
@printf "$(YELLOW)--- mutt ------------------------------------------------\n$(RESET)"
stow -t "$$HOME" mutt
bin:
@printf "$(YELLOW)--- bin -------------------------------------------------\n$(RESET)"
mkdir -p "$$HOME/bin"
stow -t "$$HOME/bin/" bin
vim:
@printf "$(YELLOW)--- vim -------------------------------------------------\n$(RESET)"
stow -t "$$HOME" vim
if [ ! -f "$$HOME/.vim/autoload/plug.vim" ]; then \
curl -sfLo "$$HOME/.vim/autoload/plug.vim" --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim; \
fi
@printf " $(GREEN)Launch vim and run :PlugInstall\n"
neovim:
@printf "$(YELLOW)--- neovim ----------------------------------------------\n$(RESET)"
mkdir -p "$$HOME/.config/nvim"
stow -t "$$HOME/.config/nvim/" neovim
if [ ! -f "$$HOME/.local/share/nvim/site/autoload/plug.vim" ]; then \
curl -sfLo "$$HOME/.local/share/nvim/site/autoload/plug.vim" --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim; \
fi
@printf " $(GREEN)Launch nvim and run :PlugInstall\n"
cmus:
@printf "$(YELLOW)--- cmus ------------------------------------------------\n$(RESET)"
mkdir -p "$$HOME/.cmus"
stow -t "$$HOME/.cmus/" cmus
tmux:
@printf "$(YELLOW)--- tmux ------------------------------------------------\n$(RESET)"
stow -t "$$HOME" tmux
if [ ! -d "$$HOME/.tmux/plugins/tpm" ]; then \
git clone https://github.com/tmux-plugins/tpm "$$HOME/.tmux/plugins/tpm" --quiet; \
if ! { [ "$$TERM" = "screen" ] && [ -n "$$TMUX" ]; } then \
tmux source-file "$$HOME/.tmux.conf"; \
fi \
fi
@printf " $(GREEN)Launch tmux and run \`I to install plugins\n$(RESET)"
sc-im:
@printf "$(YELLOW)--- sc-im -----------------------------------------------\n$(RESET)"
stow -t "$$HOME/" sc-im
vf1:
@printf "$(YELLOW)--- vf1 -------------------------------------------------\n$(RESET)"
stow -t "$$HOME/" vf1
.PHONY: bash git news utils zsh bin vim tmux mutt cmus clean install OSX Linux Other i3 neovim sc-im alacritty vf1