3 # Copyright 2007 Max Bowsher
4 # Licensed under the terms Subversion ships under
6 # Runs the 'find' program, with arguments munged such that '.svn' or 'CVS'
7 # working copy administrative directories and their contents are ignored.
17 for option
in "$@"; do
18 if [ "$phase" = "optspaths" ]; then
21 -*|
"("*|
")"*|
,*|
!*) phase
=exprmain
;;
25 if [ "$exproptarg" = "yes" ]; then
29 if [ "$phase" = "exprmain" ]; then
31 -depth|
-d) depth
=yes ;;
32 -delete|
-exec|
-exec|
-execdir|
-execdir|
-fls|
-fprint|
-fprint0 \
33 |
-fprintf|
-ok|
-print|
-okdir|
-print0|
-printf|
-quit|
-ls) print
= ;;
36 -depth|
-d|
-noleaf|
-mount|
-xdev|
-warn|
-nowarn \
37 |
-ignore_readdir_race|
-noignore_readdir_race) phase
=expropts
;;
38 -maxdepth|
-mindepth|
-regextype) phase
=expropts
; exproptarg
=yes ;;
43 eval "$phase=\"\$$phase \\\"$option\\\"\""
44 if [ "$phase" = "expropts" ]; then
49 if [ -z "$somethingseen" ]; then
50 exprmain
="$exprmain -print"
54 if [ "$depth" = "yes" ]; then
55 eval find $optspaths $expropts \
56 -regex \''.*/\.svn'\' -or -regex \''.*/\.svn/.*'\' \
57 -or -regex \''.*/CVS'\' -or -regex \''.*/CVS/.*'\' \
58 -or '\(' $exprmain '\)' $print
60 eval find $optspaths $expropts '\(' -name .svn
-or -name CVS
'\)' -prune \
61 -or '\(' $exprmain '\)' $print