The `-depth` switch does not take an argument, but `-maxdepth does`, so:
for dir in `find . -depth -maxdepth 1 -type d`
do
....
should work.
The `-depth` argument as per the man page means process directory contents first.