.NOTPARALLEL: backup index sitemaps TITLE ?= my-project TREE_OPTIONS = -T $(TITLE) -I backups -h -cD DATE = $(shell date +'%Y-%m-%d-%H:%M:%S') all: clean build index: tree $(TREE_OPTIONS) -H . -t -D --prune . > index.html sitemaps: tree $(TREE_OPTIONS) -X . . > index.xml tree $(TREE_OPTIONS) -J . . > index.json build: clean index sitemaps deploy: backup build rsync -av . me@server:/katalog backup: clean mkdir -p backups zip -x "backups/*" -r backups/$(DATE).zip . find backups/ -name "*.zip" -cmin -60 | xargs rm -rfv clean: find src/ -type d -name __pycache__ | xargs rm -rvf