noxz-sites

A collection of a builder and various scripts creating the noxz.tech sites
git clone https://noxz.tech/git/noxz-sites.git
Log | Files | README | LICENSE

Makefile
1include config.mk
2
3all: clean check
4	@echo building sites
5	@./build
6	@
7	@echo creating icons
8	@magick ./noxz.tech/pub/logo.black.svg -density 1200 -resize 256x256 ./noxz.tech/pub/logo.png
9	@magick ./git.noxz.tech/pub/logo.svg -density 1200 -resize 256x256 ./noxz.tech/git/pub/logo.png
10	@
11	@echo assembling tar archive '${ASSEMBLE_TAR}'
12	@./assemble "${ASSEMBLE_TAR}"
13
14only:
15	@echo building $${BUILDONLY}
16	@[ ! -z ${BUILDONLY} ] && ./build
17
18check:
19	@./build check
20
21publish:
22	@echo publishing to web server...
23	@[ -f "${ASSEMBLE_TAR}" ] || { echo "'${ASSEMBLE_TAR}' is missing, must build first"; exit 1; }
24	@./publish "${ASSEMBLE_TAR}" "${PUBLISH_PATH}"
25
26clean:
27	@echo cleaning
28	@find ./noxz.tech/ -name '*.html' -type f -exec sh -ec 'rm "$$0"' {} \;
29	@find ./git.noxz.tech/ -name '*.html' -type f -exec sh -ec 'rm "$$0"' {} \;
30	@rm -rf ./noxz.tech/git
31	@rm -f noxz.tech/pub/logo.png
32	@rm -f noxz.tech/pub/sitemap.xml
33	@rm -f git.noxz.tech/pub/logo.png
34	@rm -f git.noxz.tech/pub/sitemap.xml
35	@rm -f "${ASSEMBLE_TAR}"
36
37clean-git:
38	@find ./git.noxz.tech/* -type d -prune ! -name "pub" -exec sh -ec 'rm -rf "$$0"' {} \;
39
40preview:
41	@echo trying to start web server at port 8000
42	@python -m http.server 8000 --directory ./noxz.tech
43
44.PHONY: all check publish clean clean-git preview