Guest User

Untitled

a guest
May 27th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. SHELL:=/bin/bash
  2. BASEDIR=$(CURDIR)
  3. OUTPUTDIR=$(BASEDIR)/public
  4.  
  5. optipng = find $(OUTPUTDIR) -name '*.png' -print0 | xargs -0 -P8 -n2 optipng -o5 -strip all -quiet
  6. optijpg = find $(OUTPUTDIR) -name '*.jpg' -print0 | xargs -0 -P8 -n2 jpegoptim --strip-all -m30 -q
  7.  
  8. site:
  9.  
  10. @echo "Deleting files from old publication"
  11. rm -rf $(OUTPUTDIR)/*
  12.  
  13. @echo "Generating site"
  14. hugo
  15.  
  16. @echo "Optimizing images"
  17. $(call optijpg)
  18. $(call optipng)
  19.  
  20. @echo "Preparing commit"
  21. cd $(OUTPUTDIR)/ && git add . && git status && git commit -m "$(m)"
Add Comment
Please, Sign In to add comment