0
0
Fork 0
Our blog as a set of static pages. http://zero-knowledge.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

29 lines
797 B

# install http files into this directory
HTTPDIR=/tmp/zblog
# give all files to this owner after copy
OWNER != id -u
# give all files to this group after copy
GROUP != id -g
# set this mode on all directories
DIRMODE = 554
# set this mode on all files
FILEMODE = 444
.PHONY: clean install
all: clean build
dev:
go run main.go --content-dir content --template-dir templates --static-dir static --listen "127.0.0.1:8080"
build:
go run main.go --content-dir content --template-dir templates --static-dir static --output-dir $(HTTPDIR)
clean:
-rm -r public/*
install:
rsync --delete -r public/ $(HTTPDIR)/
find $(HTTPDIR) ! -path $(HTTPDIR) -type d -exec chmod $(DIRMODE) {} +
find $(HTTPDIR) ! -path $(HTTPDIR) -type f -exec chmod $(FILEMODE) {} +
chown -R $(OWNER):$(GROUP) $(HTTPDIR)/