Thanks for the script, it works fine. The only annoying thing was that it syncs everything, including .git/ folders and the like.
This is my solution to exclude a folder from syncing:
- move the .git folder out of the Dropbox sync folder
- create an empty .git folder in the old location
- uncheck this empty folder in the selective sync list in the Dropbox preferences. It will be deleted locally (that's why we moved it in step 1)
- move back the folder to it's previous location. Dropbox will now ignore it.