-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (33 loc) · 1.48 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
# Created by Andre Anjos <[email protected]>
# Qui 26 Jul 2007 10:16:23 CEST
#
# This makefile maintains the symbolic links from the user home directory
# pointing to this directory. The mechanics of work is like this:
#
# git clone <repo>/dotfiles <to-wherever-you-want>
# cd <to-wherever-you-want>
# make deepclean; make
#
# This should install all relevant symbolic links to the files in this
# directory. From this point on, you control the contents of your dotfiles from
# within this directory and your home directory will be updated accordingly
# when you do a "make" from here.
FILES=$(shell find `pwd` -maxdepth 1 -not -name '.*' -not -name '*~' -not -name 'Makefile' -not -name 'ssh' -not -name 'config')
SSHFILES=$(shell find `pwd`/ssh -maxdepth 1 -not -name '.*' -not -name '*~' -type f)
GARBAGE=$(shell find `pwd` -name '*~')
all: deepclean ssh ipython
@for f in $(FILES); do ln -s -v -f $$f $$HOME/.`basename $$f`; done
ssh:
@for f in $(SSHFILES); do ln -s -v -f $$f $$HOME/.ssh/`basename $$f`; done
ipython:
@if [ ! -d $$HOME/.config ]; then mkdir $$HOME/.config; fi
@ln -s -v -f $$PWD/config/ipython $$HOME/.config/
xfce-terminal:
@if [ -d $$HOME/.config/Terminal ]; then rm -rf $$HOME/.config/Terminal; fi
@ln -s -v -f $$PWD/config/Terminal $$HOME/.config/Terminal
.PHONY: clean all deepclean ssh
clean:
@rm -f -v $(GARBAGE)
deepclean: clean
@for f in $(FILES); do rm -f -v $$HOME/.`basename $$f`; done
@for f in $(SSHFILES); do rm -f -v $$HOME/.ssh/`basename $$f`; done