-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (35 loc) · 910 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
36
37
38
39
40
41
42
43
44
45
# Manage the dotfiles environment.
# List of default packages to install.
PACKAGES := \
ack \
bash \
bin \
fzf \
git \
profile \
ranger \
ssh \
tmux \
vim \
zsh
DOTFILESDIR := $(shell dirname "$(readlink -f "$0")")
TARGETDIR := ~
# Abort if git is not installed.
ifeq (, $(shell which git))
$(error "No git in $$PATH, install it first")
endif
# Abort if stow is not installed.
ifeq (, $(shell which stow))
$(error "No stow in $$PATH, install it first")
endif
all: stow ansible
ansible:
ansible-galaxy install -r ansible/requirements.yml
ANSIBLE_CONFIG=ansible/ansible.cfg ansible-playbook ansible/bootstrap.yml -i ansible/inventory.ini --tags untagged
stow:
stow -t $(TARGETDIR) -d $(DOTFILESDIR) $(PACKAGES)
stow-lint:
chkstow -t $(TARGETDIR) # find dangling symlinks
unstow:
stow -t $(TARGETDIR) -d $(DOTFILESDIR) --delete $(PACKAGES)
.PHONY: all ansible stow stow-lint unstow