Our blog as a set of static pages. http://zero-knowledge.org

Makefile 581B

1234567891011121314151617181920212223242526
  1. # install http files into this directory
  2. HTTPDIR=/tmp/zblog
  3. # give all files to this owner after copy
  4. OWNER != id -u
  5. # give all files to this group after copy
  6. GROUP != id -g
  7. # set this mode on all directories
  8. DIRMODE = 554
  9. # set this mode on all files
  10. FILEMODE = 444
  11. .PHONY: clean install
  12. all: clean build
  13. build:
  14. hugo
  15. clean:
  16. -rm -r public/*
  17. install:
  18. rsync --delete -r public/ $(HTTPDIR)/
  19. find $(HTTPDIR) ! -path $(HTTPDIR) -type d -exec chmod $(DIRMODE) {} +
  20. find $(HTTPDIR) ! -path $(HTTPDIR) -type f -exec chmod $(FILEMODE) {} +
  21. chown -R $(OWNER):$(GROUP) $(HTTPDIR)/