-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
48 lines (37 loc) · 1.17 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
# Makefile for lsdr-vim distribution
DIST=$(HOME)/.vim
all: install
vimrc gvimrc:
ln -nsf $(DIST)/_$@ $(HOME)/.$@
relink: vimrc gvimrc
@printf "Configuration files relinked!\n"
tmpdir bundledir docdir:
mkdir -p $(DIST)/$(patsubst %dir,%,$@)
init_bundle:
@printf "Initializing bundles...\n";
@if [ ! -d $(DIST)/bundle/vundle ]; then \
git clone https://github.com/gmarik/vundle.git $(DIST)/bundle/vundle; \
fi
load_bundle: init_bundle
vim +PluginInstall +qall
env_setup:
@printf "Looking for a lsdr-vim distro... ";
@if [ ! -d $(DIST) ]; then \
printf "Ops! \033[1;31m~/.vim is missing\033[0m, but is required to install. \033[1;37mQuitting\033[0m.\n"; \
exit 1; \
else \
printf "OK!\n"; \
fi
install: env_setup tmpdir bundledir load_bundle vimrc gvimrc
@printf "All set. \033[1;32mvim is ready\033[0m to code.\n";
clean:
rm -fr $(HOME)/.vimrc
rm -fr $(HOME)/.gvimrc
rm -fr $(DIST)/tmp
rm -fr $(DIST)/conf.d
rm -fr $(DIST)/bundle
@printf "Done. lsdr-vim was \033[1;37msuccessfully uninstalled\033[0m. Moving on...\n";
# implode:
# cd $(HOME)
# rm -fr $(DIST)
# @printf "There you go. lsdr-vim was \033[1;37mfully imploded\033[0m.\n";