-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (29 loc) · 867 Bytes
/
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
.PHONY: all deploy build public upload redirect clean
HUGO := hugo --gc
all: build
deploy: clean public upload
build:
$(HUGO) --destination _build
serv:
$(HUGO) server
public:
$(HUGO) --minify
upload:
rsync -rhv --progress --delete public/ /var/www/research.aurelienooms.be
redirect:
# rm -rf public_html
# cp -r public{,_html}
# scp -r public_html/ aureooms@homepages.ulb.ac.be:/u/aureooms/
# does not work must use ftp with filezilla
# use curlftps instead
# (in a parent directory to avoid console hooks lag)
# http://jotschi.de/2012/04/17/rsync-to-ftp-operation-not-supported-95/
mkdir ../.ftp
mkdir ../.ftp-tmp
curlftpfs homepages.ulb.ac.be ../.ftp -o user=aureooms
rsync -rh --progress --delete --temp-dir=../../.ftp-tmp redirect/ ../.ftp/public_html
fusermount -u ../.ftp
rm -r ../.ftp
rm -r ../.ftp-tmp
clean:
rm -rf _build public