From cf102ad6c7d171dd500cae8b419b7f5c1e796ab4 Mon Sep 17 00:00:00 2001 From: lemurianmage Date: Sun, 31 May 2026 00:17:31 +0200 Subject: make instead of shell scripts --- makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 makefile (limited to 'makefile') diff --git a/makefile b/makefile new file mode 100644 index 0000000..d356503 --- /dev/null +++ b/makefile @@ -0,0 +1,28 @@ +# this fucking sucks lol + +all: build + +serve: + xdg-open http://localhost:8000/ + python3 -m http.server -d public/ + +watch: + find src/ templates/ -type f | entr make build + +build: # shit breaks when index.org doesnt exist idk why + [ -f src/blog/index.org ] || touch src/blog/index.org + @mkdir -p public/ + emacs -Q --script build-site.el + +compress: build # for gzip-static, check the obsd httpd.conf(5) man page + find public/ -type f \( -name "*.html" -o -name "*.css" -o -name "*.xml" \) \ + -exec gzip -k {} \; + +publish: compress build + rsync -rcvP --delete public/ \ + lemurianmage@slimegirl.nexus:/var/www/htdocs/slimegirl.nexus + +clean: + rm -r public/ + +.PHONY: serve watch build compress publish clean -- cgit v1.2.3