-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (24 loc) · 814 Bytes
/
Copy pathMakefile
File metadata and controls
28 lines (24 loc) · 814 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
UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
OS_BASH_EXCLUDE := .config/bash/linux.sh
else
OS_BASH_EXCLUDE := .config/bash/macos.sh
endif
help: ## Show this help message
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
install: ## Install dotfiles as symlinks in the current user's home directory
@find . -type f \
-not -path './.git/*' \
-not -name '.DS_Store' \
-not -name 'Makefile' \
-not -name 'README.md' \
-not -name 'LICENSE' \
-not -path './$(OS_BASH_EXCLUDE)' \
| while read -r file; do \
src="$(CURDIR)/$${file#./}"; \
dest="$(HOME)/$${file#./}"; \
mkdir -p "$$(dirname "$$dest")"; \
ln -sf "$$src" "$$dest"; \
echo " $$dest -> $$src"; \
done
.PHONY: help install