This repository has been archived by the owner on Oct 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (53 loc) · 2.05 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
SHELL := bash
.PHONY: all
all: bin etc
.PHONY: bin
bin: ## Installs the bin directory files.
# add aliases for things in bin
for file in $(shell find $(CURDIR)/bin -type f -not -name ".*.swp"); 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 ".github" -not -name ".*.swp" -not -name ".gnupg"); do \
f=$$(basename $$file); \
ln -sfn $$file $(HOME)/$$f; \
done; \
gpg --list-keys || true;
mkdir -p $(HOME)/.gnupg
for file in $(shell find $(CURDIR)/.gnupg); do \
f=$$(basename $$file); \
ln -sfn $$file $(HOME)/.gnupg/$$f; \
done; \
# ln -fn $(CURDIR)/gitignore $(HOME)/.gitignore;
# git update-index --skip-worktree $(CURDIR)/.gitconfig;
mkdir -p $(HOME)/.config;
# ln -snf $(CURDIR)/.i3 $(HOME)/.config/sway;
mkdir -p $(HOME)/.local/share;
ln -snf $(CURDIR)/.fonts $(HOME)/.local/share/fonts;
ln -snf $(CURDIR)/.bash_profile $(HOME)/.profile;
if [ -f /usr/local/bin/pinentry ]; then \
sudo ln -snf /usr/bin/pinentry /usr/local/bin/pinentry; \
fi;
mkdir -p $(HOME)/Pictures;
# ln -snf $(CURDIR)/central-park.jpg $(HOME)/Pictures/central-park.jpg;
mkdir -p $(HOME)/.config/fontconfig;
ln -snf $(CURDIR)/.config/fontconfig/fontconfig.conf $(HOME)/.config/fontconfig/fontconfig.conf;
xrdb -merge $(HOME)/.Xdefaults || true
xrdb -merge $(HOME)/.Xresources || true
fc-cache -f -v || true
.PHONY: etc
etc: ## Installs the etc directory files.
sudo mkdir -p /etc/docker/seccomp
for file in $(shell find $(CURDIR)/etc -type f -not -name ".*.swp"); do \
f=$$(echo $$file | sed -e 's|$(CURDIR)||'); \
sudo mkdir -p $$(dirname $$f); \
sudo ln -f $$file $$f; \
done
systemctl --user daemon-reload || true
sudo systemctl daemon-reload
sudo systemctl enable systemd-networkd systemd-resolved powertop
sudo systemctl start systemd-networkd systemd-resolved powertop
sudo ln -snf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf