This is a bit verbose as it uses find:
find [TARGET-DIRECTORY] \( -executable -type f \) -prune -o -print | xargs svn add --depth empty
Passing the target directory to search, find will overwrite the directory that prints all the contents except for executable files ( \( -executable -type f \) -prune ). Without -type f find will also clip directories, as they usually have an execution bit or a search bit.
The --depth empty to add indicates svn is not a recursive file object itself, since find handles recursion.
If you like the result, you can put it in a shell function that allows you to pass arguments to [TARGET-DIRECTORY] .
Thanks,
Zachary
Zachary young
source share