
name := FindEmail
app :=  Drop$(name).app
icns := $(app)/Contents/Resources/DropScript.icns

app: $(app)
	-chmod -R a+w $(app)    
	-rm -rf $(app)
	open -a DropScript $(name).sh
	# open returns before DropScript finished
	while ! [ -e "$(icns)" ]; do sleep 0.1; done
	cp -f DropScript.icns "$(icns)"
	chmod -R a-w $(app)

site: README app
	rst2html.py README > site/index.html
	bzr export site/files/Drop$(name).src.tgz
	ditto -ckX --keepParent --norsrc $(app) site/files/Drop$(name).zip

update-site: site
	tar cjf - -C site . | ssh nirs@nirs.freeshell.org tar xjf - -C '~/html/findemail'