-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (27 loc) · 800 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
BIN_FILES=$(shell ls ./local/bin | sed 's@.*@~/.local/bin/&@')
SHD_FILES=$(shell ls ./config/sh.d | sed 's@.*@~/.config/sh.d/&@')
ZSHD_FILES=$(shell ls ./config/zsh.d | sed 's@.*@~/.config/zsh.d/&@')
BASHD_FILES=$(shell ls ./config/bash.d | sed 's@.*@~/.config/bash.d/&@')
NVIM_FILES=$(shell ls ./config/nvim | sed 's@.*@~/.config/nvim/&@')
.PHONY: install
install: bin sh zsh nvim
.PHONY: bin
bin: $(BIN_FILES)
.PHONY: sh
sh: $(SHD_FILES)
.PHONY: zsh
zsh: ~/.zshrc $(ZSHD_FILES)
~/.zshrc: zshrc
ln -s $(PWD)/zshrc $@
.PHONY: bash
bash: ~/.bashrc $(BASHD_FILES)
~/.bashrc: bashrc
ln -s $(PWD)/bashrc $@
.PHONY: nvim
nvim: $(NVIM_FILES)
~/.local/bin/%: ./local/bin/%
mkdir -p $(shell dirname $@)
ln -s $(PWD)/$^ $@
~/.config/%: ./config/%
mkdir -p $(shell dirname $@)
ln -s $(PWD)/$^ $@