-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
41 lines (33 loc) · 1.13 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
NO_COLOR=\x1b[0m
GREEN=\x1b[32;01m
RED=\x1b[31;01m
YELL=\x1b[33;01m
SYMLINKS = **/*.symlink
.SILENT: symlink unlink brew brew-check brew-tools brew-fonts
symlink:
for link in $(SYMLINKS); do\
dotfile=~/.`echo $$link | sed 's#.*/\([^/]*\).symlink#\1#'`;\
[ -f $$dotfile -a ! -h $$dotfile ] && mv $$dotfile $$dotfile.bak && echo "$(YELL)$$dotfile baked up$(NO_COLOR)";\
ln -fs `pwd`/$$link $$dotfile;\
echo "$(GREEN)$$link -> $$dotfile$(NO_COLOR)";\
done;\
true
unlink:
for link in $(SYMLINKS); do\
dotfile=~/.`echo $$link | sed 's#.*/\([^/]*\).symlink#\1#'`;\
[ -h $$dotfile ] && rm -f $$dotfile && echo "$(RED)$$dotfile removed$(NO_COLOR)";\
[ -f $$dotfile.bak ] && mv $$dotfile.bak $$dotfile && echo "$(GREEN)$$dotfile.bak restored$(NO_COLOR)";\
done;\
true
brew: brew-check brew-fonts brew-tools
brew-check:
if test ! $$(which brew); then\
echo "$(RED)x You should probably install Homebrew first$(NO_COLOR)";\
exit 1;\
fi
brew-tools:
brew install coreutils python python@2 ansible fzf git macvim neovim postgresql rbenv ag tmux
brew install ansifilter
brew-fonts:
brew tap homebrew/cask-fonts
brew cask install font-hack