better bin/publish.sh script