forked from h3xx/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (28 loc) · 831 Bytes
/
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
SUBDIRS = \
ack
all: dootfiles
check:
@err=0 ;\
for dir in $(SUBDIRS); do \
make -C $$dir check || err=1 ;\
done ;\
exit $$err
fix:
(for bashrc in ~/.bashrc* ~/.bash_profile; do \
if [[ "$$(readlink "$$bashrc")" =~ dotfiles/home ]]; then \
ln -svTf "$$(readlink "$$bashrc" |sed -e 's,dotfiles/home,dotfiles/bash,')" "$$bashrc" ;\
fi ;\
done)
(if [[ "$$(readlink ~/.ipager)" =~ dotfiles/home ]]; then \
nl="$$(readlink ~/.ipager |sed -e 's,dotfiles/home/\.ipager,dotfiles/ipager,')" ;\
rm ~/.ipager &&\
ln -svTf "$$nl" ~/.ipager ;\
fi)
(if [[ "$$(readlink ~/.gitconfig)" =~ dotfiles/home ]]; then \
nl="$$(readlink ~/.gitconfig |sed -e 's,dotfiles/home,dotfiles/git,')" ;\
rm ~/.gitconfig &&\
ln -svTf "$$nl" ~/.gitconfig ;\
fi)
dootfiles:
@echo "thank mr skeltal"
.PHONY: all fix dootfiles