-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
55 lines (42 loc) · 1.59 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
.PHONY: install all zsh vim nvim tmux alacritty scripts dirs gdbinit
DOTFILE_HOME := $(shell cd "$(dirname "$0")" ; pwd -P)
OBJS := $(HOME)/.zshenv \
$(ZDOTDIR)/.zshrc \
$(ZDOTDIR)/.zprofile \
$(HOME)/.vimrc \
$(XDG_CONFIG_HOME)/nvim \
$(XDG_CONFIG_HOME)/tmux/tmux.conf \
$(XDG_CONFIG_HOME)/alacritty/alacritty.toml \
$(HOME)/.gdbinit \
$(HOME)/.gitconfig \
install all: dirs zsh vim nvim tmux gdbinit gitconfig
world: install alacritty scripts
zsh:
mkdir -p "$(ZDOTDIR)"
mkdir -p "$(shell dirname $(HISTFILE))"
ln -sf "$(DOTFILE_HOME)/zshenv" "$(HOME)/.zshenv"
ln -sf "$(DOTFILE_HOME)/zshrc" "$(ZDOTDIR)/.zshrc"
ln -sf "$(DOTFILE_HOME)/zprofile" "$(ZDOTDIR)/.zprofile"
vim:
ln -sf "$(DOTFILE_HOME)/vimrc" "$(HOME)/.vimrc"
nvim:
ln -sf "$(DOTFILE_HOME)/nvim" "$(XDG_CONFIG_HOME)/nvim"
tmux:
mkdir -p "$(XDG_CONFIG_HOME)/tmux"
ln -sf "$(DOTFILE_HOME)/tmux.conf" "$(XDG_CONFIG_HOME)/tmux/tmux.conf"
alacritty:
mkdir -p "$(XDG_CONFIG_HOME)/alacritty"
ln -sf "$(DOTFILE_HOME)/alacritty.toml" "$(XDG_CONFIG_HOME)/alacritty/alacritty.toml"
scripts: dirs
ln -sf "$(DOTFILE_HOME)/bin/"* "$(HOME)/.local/bin"
gdbinit:
ln -sf "$(DOTFILE_HOME)/gdbinit" "$(HOME)/.gdbinit"
gitconfig:
ln -sf "$(DOTFILE_HOME)/gitconfig" "$(HOME)/.gitconfig"
dirs:
mkdir -p "$(HOME)/.local/bin"
mkdir -p "$(XDG_CONFIG_HOME)"
mkdir -p "$(XDG_CACHE_HOME)"
mkdir -p "$(XDG_DATA_HOME)"
clean-all:
rm -rf $(OBJS)