-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (31 loc) · 1.24 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
.PHONY: dotfiles
DOTFILES := $(shell pwd)
DARWIN := $(shell uname | grep Darwin)
install: zshrc gitconfig ~/.config/nvim ~/.wezterm.lua
~/.oh-my-zsh:
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
~/.dotfiles:
echo "export DOTFILES=$(DOTFILES)" > ~/.dotfiles
zshrc: ~/.oh-my-zsh ~/.dotfiles
grep "\.dotfiles" ~/.zshrc || echo ". $(HOME)/.dotfiles" > ~/.zshrc
grep "$(DOTFILES)/zsh/rc" ~/.zshrc || echo "source \$$DOTFILES/zsh/rc" >> ~/.zshrc
[ $(USER) = key ] && grep "zsh/keyrc" ~/.zshrc || echo "source \$$DOTFILES/zsh/keyrc" >> ~/.zshrc
gitconfig: ~/.gitignore
grep include ~/.gitconfig || echo "[include]\n\tpath = $(DOTFILES)/git/config" >> ~/.gitconfig
~/.gitignore:
cp $(DOTFILES)/git/ignore ~/.gitignore
~/.config/nvim:
mkdir -p ~/.config
ln -s $(DOTFILES)/lazyvim ~/.config/nvim
docker-compose:
grep "docker-compose" ~/.zshrc || echo 'source \$$DOTFILES/zsh/docker-compose' >> ~/.zshrc
~/.wezterm.lua: sleepwatcher-wezterm
ifneq ($(DARWIN),)
sed s:__dotfiles__:$(DOTFILES): wezterm.lua > ~/.wezterm.lua
endif
sleepwatcher-wezterm:
ifneq ($(DARWIN),)
git clone https://github.com/kosmatov/sleepwatcher-wezterm
endif
clean:
rm ~/.dotfiles ~/.zshrc ~/.gitconfig ~/.gitignore ~/.config/nvim ~/.wezterm.lua