forked from jessfraz/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (30 loc) · 974 Bytes
/
Makefile
File metadata and controls
37 lines (30 loc) · 974 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
30
31
32
33
34
35
36
37
.PHONY: all bin default dotfiles etc init install
all: bin dotfiles etc init
default: install
install: all
bin:
# add aliases for things in bin
for file in $(shell find $(CURDIR)/bin -type f -not -name "*-backlight"); do \
f=$$(basename $$file); \
sudo ln -sf $$file /usr/local/bin/$$f; \
done
dotfiles:
# add aliases for dotfiles
for file in $(shell find $(CURDIR) -name ".*" -not -name ".gitignore" -not -name ".git" -not -name ".*.swp"); do \
f=$$(basename $$file); \
ln -sfn $$file $(HOME)/$$f; \
done
etc:
for file in $(shell find $(CURDIR)/etc -type f); do \
f=$$(echo $$file | sed -e 's|$(CURDIR)||'); \
sudo install -p -m 644 $$file $$f; \
done
systemctl --user daemon-reload
init:
# install init scripts
# of course systemd hates aliases or some bullshit
for file in $(shell find $(CURDIR)/init -type f); do \
f=$$(basename $$file); \
sudo install -p -m 644 $$file /lib/systemd/system/$$f; \
done
sudo systemctl daemon-reload