-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
293 lines (236 loc) · 7.18 KB
/
Copy pathmakefile
File metadata and controls
293 lines (236 loc) · 7.18 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
# Oliver Jourmel
# Initialization and configuration make file
#
# Targets can be used to install, update, and diff dotfiles
help:
@echo ""
@echo "WARNING: This will clober your current dotfiles!"
@echo "Use setup-all to get things going"
@echo "Use install-all to check dependencies"
@echo "Use configure-all to set up the dotfiles!"
@echo "Use configure-shell to set up server defaults"
@echo "Use configure-desktop to set up X windows stuff"
@echo "Use diff-all to see what kind of changes will be happening!"
@echo "Use backup-all to create a dofile-backup folder and save your current configuration!"
@echo "Use backup-restore to replace your current configuration with the files in ~/dotfile-backup/"
git-tmux-module:
git submodule update --init tmux/tmux/plugins/tpm
git-vim-module:
git submodule update --init vim/vim/bundle/Vundle.Vim
setup-all:
@echo "WARNING! This will clober your current dotfiles!"
@echo ""
@while [ -z "$$CONTINUE" ]; do \
read -r -p "Are you SURE this is a good idea??" CONTINUE; \
done ;
@if [ $$CONTINUE != "y" ] && [ $$CONTINUE != "Y" ]; then \
echo "Exiting." ; exit 1 ; \
fi
@make install-all
@make configure-all
install-all:
@echo testing for dependencies...
@echo please verify that the following programs are installed:
@echo '* bash'
@echo '* elinks'
@echo '* htop'
@echo '* vim'
@echo '* zsh'
@echo '* i3'
@echo '* urxvt'
@echo '* bin'
@echo '* tmux'
@echo ''
configure-all: configure-shell configure-desktop
@true
configure-shell: bash elinks htop motd vim zsh bin tmux
@true
configure-desktop: i3 urxvt
@true
backup-all:
[ -d ~/dotfiles-backup ] || mkdir ~/dotfiles-backup/
@make back-bash back-elinks back-htop back-i3 back-motd back-urxvt back-vim back-zsh back-bin back-backup
@true
back-bash:
cp ~/.bashrc ~/dotfiles-backup/bashrc
@true
back-elinks:
cp ~/.elinks/elinks.conf ~/dotfiles-backup/elinks.conf
@true
back-htop:
cp ~/.config/htop/htoprc ~/dotfiles-backup/htoprc
@true
back-i3:
@[ -d ~/dotfiles-backup/i3 ] || mkdir -p ~/dotfiles-backup/i3/
cp ~/.i3/config ~/dotfiles-backup/i3/config
cp ~/.i3/i3status.conf ~/dotfiles-backup/i3/i3status.conf
@true
back-motd:
cp ~/.motd ~/dotfiles-backup/motd
@true
back-urxvt:
@[ -d ~/dotfiles-backup/urxvt ] || mkdir -p ~/dotfiles-backup/urxvt/
cp ~/.Xresources ~/dotfiles-backup/urxvt/Xresources
cp -r ~/.urxvt/ ~/dotfiles-backup/urxvt/urxvt
@true
back-vim:
cp -r ~/.vim ~/dotfiles-backup/vim
cp ~/.vimrc ~/dotfiles-backup/vimrc
@true
back-zsh:
cp ~/.zlogin ~/dotfiles-backup/zlogin
cp ~/.zshaliases ~/dotfiles-backup/zshaliases
cp ~/.zshenv ~/dotfiles-backup/zshenv
cp ~/.zshfunctions ~/dotfiles-backup/zshfunctions
cp ~/.zshgrml ~/dotfiles-backup/zshgrml
cp ~/.zshrc ~/dotfiles-backup/zshrc
@true
back-bin:
cp -r ~/bin ~/dotfiles-backup/bin
@true
back-tmux:
cp -r ~/.tmux ~/dotfiles-backup/tmux
cp ~/.tmux.conf ~/dotfiles-backup/tmux.conf
@true
backup-restore: brest-bash brest-elinks brest-htop brest-i3 brest-motd brest-urxvt brest-vim brest-zsh brest-bin brest-tmux
brest-bash:
cp ~/dotfiles-backup/bashrc ~/.bashrc
@true
brest-elinks:
cp ~/dotfiles-backup/elinks.conf ~/.elinks/elinks.conf
@true
brest-htop:
cp ~/dotfiles-backup/htoprc ~/.config/htop/htoprc
@true
brest-i3:
cp ~/dotfiles-backup/i3/config ~/.i3/config
cp ~/dotfiles-backup/i3/i3status.conf ~/.i3/i3status.conf
@true
brest-motd:
cp ~/dotfiles-backup/motd ~/.motd
@true
brest-urxvt:
@[ -d ~/.urxvt ] && rm -rf .urxvt
cp -R ~/dotfiles-backup/urxvt/urxvt ~/.urxvt
cp ~/dotfiles/urxvt/Xresources ~/.Xresources
@true
brest-vim:
rm -rf ~/.vim
cp -r ~/dotfiles/vim ~/.vim
cp ~/dotfiles/vimrc ~/.vimrc
@true
brest-zsh:
cp ~/dotfiles-backup/zlogin ~/.zlogin
cp ~/dotfiles-backup/zshaliases ~/.zshaliases
cp ~/dotfiles-backup/zshenv ~/.zshenv
cp ~/dotfiles-backup/zshfunctions ~/.zshfunctions
cp ~/dotfiles-backup/zshgrml ~/.zshgrml
cp ~/dotfiles-backup/zshrc ~/.zshrc
@true
brest-bin:
cp -r ~/dotfiles-backup/bin ~/bin
@true
brest-tmux:
rm -rf ~/.tmux
cp -r ~/dotfiles-backup/tmux ~/.tmux
cp ~/dotfiles-backup/tmux.conf ~/.tmux.conf
@true
diff-all: diff-bash diff-elinks diff-htop diff-i3 diff-motd diff-urxvt diff-vim diff-zsh diff-zsh
@true
diff-bash:
@echo "====================== bash ======================"
-diff ~/.bashrc bash/bashrc
@echo ""
diff-elinks:
@echo "====================== elinks ======================"
-diff ~/.elinks/elinks.conf elinks/elinks.conf
@echo ""
diff-htop:
@echo "====================== htop ======================"
-diff ~/.config/htop/htoprc htop/htoprc
@echo ""
diff-i3:
@echo "====================== i3 ======================"
-diff ~/.i3/config i3/config
@echo ""
-diff ~/.i3status.conf i3/i3status.conf
@echo ""
-diff ~/.i3/i3status.conf i3/i3status.conf
@echo ""
diff-motd:
@echo "====================== motd ======================"
-diff ~/.motd motd/motd
@echo ""
diff-urxvt:
@echo "====================== urxvt ======================"
-diff ~/.Xresources urxvt/Xresources
-diff ~/.urxvt urxvt
@echo ""
diff-vim:
@echo "====================== vim ======================"
-diff ~/.vimrc vim/vimrc
@echo ""
diff-zsh:
@echo "====================== zsh ======================"
-diff ~/.zlogin zsh/zlogin
@echo ""
-diff ~/.zshaliases zsh/zshaliases
@echo ""
-diff ~/.zshenv zsh/zshenv
@echo ""
-diff ~/.zshfunctions zsh/zshfunctions
@echo ""
-diff ~/.zshgrml zsh/zshgrml
@echo ""
-diff ~/.zshrc zsh/zshrc
@echo ""
diff-bin:
@echo "====================== bin ======================"
-diff `ls -la ~/bin` `ls -la bin`
@echo ""
diff-tmux:
@echo "====================== tmux ======================"
-diff ~/.tmux.conf tmux/tmux.conf
@echo ""
bash:
cp bash/bashrc ~/.bashrc
elinks:
@[ -d ~/.elinks ] || mkdir ~/.elinks
cp elinks/elinks.conf ~/.elinks/elinks.conf
htop:
@[ -d ~/.config/htop ] || mkdir -p ~/.config/htop
cp htop/htoprc ~/.config/htop/htoprc
i3:
@[ -d ~/.i3 ] || mkdir ~/.i3
cp i3/config ~/.i3/config
cp i3/i3status.conf ~/.i3/i3status.conf
motd:
cp motd/motd ~/.motd
chmod a+x ~/.motd
urxvt:
@-[ -d ~/.urxvt ] && rm -rf ~/.urxvt
cp -r urxvt/urxvt ~/.urxvt
cp urxvt/Xresources ~/.Xresources
vim:git-vim-module
@-[ -d ~/.vim ] && rm -rf ~/.vim
cp -r vim/vim ~/.vim
cp vim/vimrc ~/.vimrc
rm -rf ~/.vim/bundle/Vundle.Vim
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim +PluginInstall +qall
zsh:
cp zsh/zlogin ~/.zlogin
cp zsh/zshaliases ~/.zshaliases
cp zsh/zshenv ~/.zshenv
cp zsh/zshfunctions ~/.zshfunctions
cp zsh/zshgrml ~/.zshgrml
cp zsh/zshrc ~/.zshrc
bin:
cp -r bin/ ~/bin
tmux:git-tmux-module
@-[ -d ~/.tmux ] && rm -rf ~/.tmux
cp -r tmux/tmux ~/.tmux
cp tmux/tmux.conf ~/.tmux.conf
rm -rf ~/.tmux/plugins/tpm
git clone https://github.com/tmux-plugins/tpm.git ~/.tmux/plugins/tpm
.PHONY: brest-tmux diff-htop back-htop install-all back-motd setup-all diff-all brest-motd htop diff-bin back-bin diff-elinks back-elinks diff-i3 back-i3 brest-zsh makefile brest-urxvt urxvt back-tmux configure-all brest-vim help brest-bash diff-motd backup-all brest-htop motd configure-shell diff-tmux vim diff-zsh configure-desktop back-zsh diff-urxvt back-urxvt tmux bash zsh brest-bin backup-restore diff-vim back-vim i3 brest-elinks brest-i3 diff-bash back-bash elinks bin