-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (25 loc) · 984 Bytes
/
Makefile
File metadata and controls
29 lines (25 loc) · 984 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
SHELL := bash
.PHONY: all
all: bin dotfiles ## Installs the bin directory and the dotfiles.
.PHONY: bin
bin: ## Installs the bin directory files.
# add aliases for things in bin
for file in $(shell find $(CURDIR)/bin -type f); do \
f=$$(basename $$file); \
sudo ln -sf $$file /usr/local/bin/$$f; \
done
.PHONY: dotfiles
dotfiles: ## Installs the dotfiles.
# add aliases for dotfiles
for file in $(shell find $(CURDIR) -name ".*" -not -name ".gitignore" -not -name ".git" -not -name ".config" -not -name ".fonts" -not -name "nvim"); do \
f=$$(basename $$file); \
ln -sfn $$file $(HOME)/$$f; \
done; \
mkdir -p $(HOME)/.config;
for dir in $(shell find $(CURDIR) -name "i3" -o -name "i3status-rust" -o -name "rofi" -o -name "sway"); do \
f=$$(basename $$dir); \
ln -sfn $$dir $(HOME)/.config; \
done; \
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'