-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
64 lines (48 loc) · 1.75 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
56
57
58
59
60
61
62
63
64
# use zsh
SHELL:=/bin/zsh
# This can be overriden by doing `make DOTFILES=some/path <task>`
DOTFILES := "$(HOME)/dotfiles"
ifeq ($(wildcard $(DOTFILES)),)
DOTFILES := ~/Projects/personal/dotfiles
endif
SCRIPTS="$(DOTFILES)/scripts"
INSTALL="$(DOTFILES)/installer.sh"
dir=not_override
# This is to symlink all files when All is selected in prompt
CANDIDATES = $(wildcard hammerspoon tmux vim zsh newsboat)
EXCLUSIONS := .DS_Store .git .gitmodules .travis.yml
DIRS := $(filter-out $(EXCLUSIONS), $(CANDIDATES))
all: node python macos
symlink:
@echo "→ Setup Environment Settings"
ifeq "$(dir)" "all"
@echo "→ Symlinking $(DIRS) files"
@$(foreach val, $(DIRS), sh $(DOTFILES)/$(val)/setup.sh && stow --restow -vv --ignore ".DS_Store" --ignore ".+.local" --target="$(HOME)/.$(val)" --dir="$(DOTFILES)" $(val);)
else ifeq "$(dir)" "files"
@echo "→ Symlinking files dir"
stow --restow -vv --ignore ".DS_Store" --ignore ".+.local" --target="$(HOME)" --dir="$(DOTFILES)" files
else ifeq "$(dir)" "nvim"
sh $(DOTFILES)/nvim/.install/run.sh
else
@echo "→ Symlinking $(dir) dir"
sh $(DOTFILES)/$(dir)/setup.sh
stow --restow -vv --ignore ".DS_Store" --ignore ".+.local" --target="$(HOME)/.$(dir)" --dir="$(DOTFILES)" $(dir)
endif
gpg: symlink
# Fix gpg folder/file permissions after symlinking
chmod 700 $(HOME)/.gnupg && chmod 600 $(HOME)/.gnupg/*
homebrew:
sh $(SCRIPTS)/brew.sh
homebrew-personal: homebrew
sh $(SCRIPTS)/brew-personal.sh
homebrew-work: homebrew
sh $(SCRIPTS)/brew-work.sh
python:
sh $(SCRIPTS)/python-packages.sh
composer:
sh $(SCRIPTS)/composer-packages.sh
node:
sh $(SCRIPTS)/nodejs.sh
macos:
sh $(DOTFILES)/extras/macos/setup.sh
.PHONY: all symlink homebrew homebrew-personal homebrew-work node python macos