forked from kura/kura.gg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
121 lines (98 loc) · 2.86 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
PY=python
PELICAN=pelican
PELICANOPTS=--fatal=errors
BASEDIR=$(CURDIR)
INPUTDIR=$(BASEDIR)/content
OUTPUTDIR=$(BASEDIR)/output
CONFFILE=$(BASEDIR)/pelicanconf.py
PUBLISHCONF=$(BASEDIR)/publishconf.py
SSH_TARGET_DIR=/var/www/kura.gg
help:
@echo 'Makefile for a pelican Web site'
@echo ''
@echo 'Usage:'
@echo ' make html (re)generate the web site'
@echo ' make clean remove the generated files'
@echo ' make regenerate regenerate files upon modification'
@echo ' make publish generate using production settings'
@echo ' make start start/restart develop_server.sh'
@echo ' make stop stop local server'
@echo ' make rsync upload the web site via rsync+ssh '
@echo ''
.PHONY: html
html: clean $(OUTPUTDIR)/index.html
$(OUTPUTDIR)/%.html:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
.PHONY: clean
clean:
[ ! -d $(OUTPUTDIR) ] || find $(OUTPUTDIR) -mindepth 1 -delete
find . -type f -iname "*.pyc" -delete
find . -type d -iname "__pycache__" -delete
.PHONY: regenerate
regenerate: clean
$(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
.PHONY: dev-start
dev-start:
pelican -rlD content/ &
.PHONY: dev-stop
dev-stop:
for pid in `ps aux | grep pelican | grep -v grep | awk '{print$$2}'`; do \
kill $$pid ; \
done
@echo 'Stopped Pelican.'
.PHONY: publish
publish:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
.PHONY: install
install:
pip install -U -r requirements.txt
sudo mkdir -p /usr/share/fonts/truetype/kura.gg/
sudo cp eevee/static/fonts/*.ttf /usr/share/fonts/truetype/kura.gg/
sudo fc-cache -v
.PHONY: test
test: clean rsync
.PHONY: cname
cname:
echo "kura.gg" > $(OUTPUTDIR)/CNAME
.PHONY: remove_crud
remove_crud:
bash scripts/remove_crud.sh $(OUTPUTDIR)/
.PHONY: pngquant
pngquant:
bash scripts/pngquant.sh $(OUTPUTDIR)/
.PHONY: screenshot
screenshot:
bash screenshot/screenshot.sh $(OUTPUTDIR)/
.PHONY: crawl
crawl:
bash scripts/crawl.sh $(OUTPUTDIR)/
.PHONY: perms
perms:
bash scripts/perms.sh $(OUTPUTDIR)/
.PHONY: hash
hash:
bash scripts/md5.sh $(OUTPUTDIR)/
bash scripts/sha1.sh $(OUTPUTDIR)/
.PHONY: touch
touch:
python3 touch.py $(INPUTDIR)/ $(OUTPUTDIR)/
.PHONE: update_cv
update_cv:
scripts/update_cv.sh
.PHONY: rsync
rsync:
rm -rf $(OUTPUTDIR)/*
$(MAKE) publish
rm -rf output/theme/fonts/roboto*
rm -rf $(OUTPUTDIR)/curriculum-vitae/ && cp -R cv $(OUTPUTDIR)/curriculum-vitae/
echo "kura.gg" > $(OUTPUTDIR)/CNAME
# bash scripts/headerid.sh $(OUTPUTDIR)/
bash scripts/remove_crud.sh $(OUTPUTDIR)/
bash scripts/pngquant.sh $(OUTPUTDIR)/
bash screenshot/screenshot.sh $(OUTPUTDIR)/
# bash scripts/compress.sh $(OUTPUTDIR)/
bash scripts/perms.sh $(OUTPUTDIR)/
bash scripts/md5.sh $(OUTPUTDIR)/
bash scripts/sha1.sh $(OUTPUTDIR)/
python3 touch.py $(INPUTDIR)/ $(OUTPUTDIR)/
# rm -rf $(OUTPUTDIR)/*