-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (36 loc) · 1.17 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
CONTEXT := $(abspath $(dir $(MAKEFILE_LIST)))
OS := $(shell uname -s)
ifeq ($(OS), Darwin)
fonts_dir = /Library/Fonts
else
fonts_dir = ~/.local/share/fonts
endif
myfont = JetBrainsMono-Medium.ttf
.PHONY: submodules sync fonts powerlevel vim
all: submodules sync fonts
submodules:
git submodule init
git submodule update --remote --rebase
sync:
rsync -av \
--exclude '.git/' \
--exclude '.gitignore' \
--exclude '.gitkeep' \
--exclude '*.swp' \
--exclude 'README.md' \
--exclude 'Makefile' \
"$(CONTEXT)/" ~/
fonts: $(fonts_dir)/$(myfont)
$(fonts_dir)/$(myfont):
mkdir -p $(fonts_dir); \
fontfile="JetBrainsMono-2.242.zip"; \
wget -cq --no-check-certificate --directory-prefix=/tmp \
https://download.jetbrains.com/fonts/$$fontfile \
&& unzip -j /tmp/$$fontfile 'fonts/ttf/*' -d $(fonts_dir) \
&& which fc-cache > /dev/null && fc-cache -vf
vim:
vim +PlugClean +PlugUpdate +UpdateRemotePlugins +qall
powerlevel:
$(eval ZSH_CUSTOM ?= $(HOME)/.oh-my-zsh/custom)
$(eval target := $$(ZSH_CUSTOM)/themes/powerlevel10k)
@if [ -d $(target) ]; then cd $(target) && git pull && cd - else git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $(target); fi