all: build

build:
	find caches -type f -not -name '.gitignore' -delete
	./bin/static-site.php

test: devel build
	rm http
	ln -s static http

devel:
	rm http
	ln -s src http

clean: devel
	rm -rf static

deploy: build
	git submodule foreach "git add . && git commit -a -m \"$m\" && git push"
	git add static
	git commit -m " * submodule updated"
#	rsync --delete -urPz static/ root@jaom.pl:/var/www/festiwal.brydzystow.pl/web
#	ssh root@jaom.pl 'chown web54:client1 /var/www/festiwal.brydzystow.pl/web -R'
# rsync 3.1.0+ only:
#	rsync --delete -urPz --chown=web54:client1 static/ root@jaom.pl:/var/www/festiwal.brydzystow.pl/web