-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
51 lines (45 loc) · 1.64 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
SSH_HOST=salixos.org
SSH_PORT=22
SSH_USER=web
SSH_TARGET_DIR=/srv/www/www.salixos.org
html:
txt2tags index.t2t
txt2tags translate.t2t
txt2tags chat.t2t
txt2tags download.t2t
txt2tags thankyou.t2t
txt2tags donations.t2t
txt2tags mailinglists.t2t
txt2tags guide.t2t
txt2tags screenshots.t2t
txt2tags team.t2t
sed -i "/^<\/HEAD>/r screenshots_header.htm" screenshots.html
sed -i "0,/^<\/HEAD>/s/^<\/HEAD>//1" screenshots.html
thumbs:
@echo 'Creating thumbnails...'
@for f in `ls screenshots/*.png | sed "s|^screenshots/||" | grep -v "thumb_"`; do \
[ -f screenshots/thumb_$$f ] || convert screenshots/$$f -resize x140 screenshots/thumb_$$f; \
done
help:
@echo 'Makefile for creating a Web site using txt2tags '
@echo ' '
@echo 'Usage: '
@echo ' make (re)generate the web site '
@echo ' make html same as make '
@echo ' make clean remove the generated files '
@echo ' make upload upload the web site via rsync+ssh '
@echo ' '
clean:
find ./ -name "*.html" -delete
upload: html thumbs
rsync -e "ssh -p $(SSH_PORT)" \
-avz \
--exclude "*.t2t" \
--exclude ".git" \
--exclude ".gitignore" \
--exclude "*.un~" \
--exclude mirmon \
--exclude mirmon.html \
--exclude Makefile \
--delete ./ $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR)
.PHONY: html thumbs help clean upload