-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (30 loc) · 982 Bytes
/
Makefile
File metadata and controls
39 lines (30 loc) · 982 Bytes
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
DOTPATH := $(PWD)
DOTS := $(wildcard .??*)
CONFIG := $(wildcard .config/*)
TARGET := $(DOTS) $(CONFIG)
EXCLUSIONS := .DS_Store .git .gitmodules .gitignore .config
DOTFILES := $(filter-out $(EXCLUSIONS), $(TARGET))
ZSHFILES := .zsh.d .zshrc .zshenv
all:install
list:
@$(foreach val, $(DOTFILES), /bin/ls -dF $(val);)
deploy:
@echo '==> Copy dotfiles to home directory.'
@echo ''
@$(foreach val,$(DOTFILES), ln -sfnv $(abspath $(val)) $(HOME)/$(val);)
init:
@echo "==> Initialized for this os."
@DOTPATH=$(DOTPATH) bash $(DOTPATH)/etc/init/init.sh
update:
git pull origin master
git submodule init
git submodule update
git submodule foreach git pull origin master
install: update init deploy
@exec $$SHELL
zsh:
@echo '==> Copy zsh setting files to home directory.'
@$(foreach val,$(ZSHFILES), ln -sfnv $(abspath $(val)) $(HOME)/$(val);)
clean:
@echo "==> Remove dotfiles from your home directory."
@-$(foreach val, $(DOTFILES), rm -vrf $(HOME)/$(val);)