-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (21 loc) · 876 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
# Increase verbosity, from 0 to 5
VERBOSE_LEVEL := 0
# Folders in the current path
PACKAGES := $(wildcard */)
all: clean install
# stow doesn't allow to override an existing file, so we need to adopt them
# which will change the git project and then restore it to the previous state
# it's a bit hacky but it works. Don't use unless it's necessary.
bootstrap:
@stow --adopt --target=${HOME} --verbose=$(VERBOSE_LEVEL) $(PACKAGES)
@git restore .
install:
@stow --target=${HOME} --verbose=$(VERBOSE_LEVEL) $(PACKAGES)
clean:
@stow --delete --target=${HOME} --verbose=$(VERBOSE_LEVEL) $(PACKAGES)
clean-nvim:
@stow --delete --target=${HOME} --verbose=$(VERBOSE_LEVEL) nvim
@rm -rf ~/.local/share/nvim/ ~/.local/state/nvim/ ~/.cache/nvim/
clean-sway:
@stow --delete --target=${HOME} --verbose=$(VERBOSE_LEVEL) sway
.PHONY: all bootstrap install clean clean-nvim