-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (29 loc) · 890 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
34
35
36
37
SOURCE := $(CURDIR)
TARGET := $(HOME)
FILES := aliases bash_profile bashrc functions gemrc gitconfig gitignore inputrc screenrc slate.js zshrc zshenv
UNAME := $(shell uname)
all: clean install
install_tmux:
@ln -sf $(CURDIR)/tmux-$(UNAME).conf $(TARGET)/.tmux.conf
@ln -sf $(CURDIR)/tmux.conf $(TARGET)/.tmux-all.conf
clean_tmux:
@-unlink $(TARGET)/.tmux.conf
@-unlink $(TARGET)/.tmux-all.conf
install_dotfiles:
@for f in $(FILES); do \
ln -sf $(SOURCE)/$$f $(TARGET)/.$$f; \
done
@ln -sf $(SOURCE)/oh-my-zsh $(TARGET)/.oh-my-zsh
@ln -sf $(SOURCE)/bin $(TARGET)/
@mkdir -p ~/.ssh/
@chmod 700 ~/.ssh/
@ln -sf $(SOURCE)/sshrc ~/.ssh/rc
clean_dotfiles:
@-for f in $(FILES); do \
unlink $(TARGET)/.$$f; \
done
@-unlink $(TARGET)/.oh-my-zsh
@-unlink $(TARGET)/.ssh/rc
@-unlink $(TARGET)/bin
install: install_dotfiles install_tmux
clean: clean_tmux clean_dotfiles