-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
47 lines (35 loc) · 922 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
38
39
40
41
42
43
44
45
46
47
default: install
INSTALL_DIR = $(HOME)
CONFIG_DIR = $(INSTALL_DIR)/.config
BIN_DIR = $(INSTALL_DIR)/.local/bin
FILES = \
$(INSTALL_DIR)/.bashrc \
$(INSTALL_DIR)/.gitconfig \
$(INSTALL_DIR)/.inputrc \
$(INSTALL_DIR)/.profile \
$(INSTALL_DIR)/.tmux.conf \
CONFIG_FILES = \
$(CONFIG_DIR)/i3 \
$(CONFIG_DIR)/i3blocks\
$(CONFIG_DIR)/nvim \
$(CONFIG_DIR)/picom \
BIN_FILES = \
$(BIN_DIR)/powerctl \
$(BIN_DIR)/git-clone-bare.sh \
$(INSTALL_DIR):
mkdir -p $(INSTALL_DIR)
$(CONFIG_DIR):
mkdir -p $(CONFIG_DIR)
$(BIN_DIR):
mkdir -p $(BIN_DIR)
$(INSTALL_DIR)/.%: .% $(INSTALL_DIR)
ln -fs $(PWD)/$< $@
$(CONFIG_DIR)/%: .config/% $(CONFIG_DIR)
ln -fs $(PWD)/$< $@
$(BIN_DIR)/%: .local/bin/% $(BIN_DIR)
ln -fs $(PWD)/$< $@
install: $(FILES) $(CONFIG_FILES) $(BIN_FILES)
git submodule update --init
uninstall:
for F in $(FILES) $(CONFIG_FILES); do find $$F -type l -delete; done
.PHONY: install uninstall