2 # --- T2-COPYRIGHT-NOTE-BEGIN ---
3 # T2 SDE: scripts/xfind.sh
4 # Copyright (C) 2004 - 2023 The T2 SDE Project
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 2.
11 # --- T2-COPYRIGHT-NOTE-END ---
13 # Subversion has really big ".svn" subdirs. This has much better performance
14 # than the "find ... ! -path '*/.svn*' ! -path '*/CVS*' ..." used earlier
15 # in various places. Never use this with -depth! Instead pipe the output thru
18 dirs=""; while [ -n "${1##[-\(\!]*}" ]; do dirs="$dirs $1"; shift; done
19 if [ $# -eq 0 ]; then set -- -print; fi;
20 action
=") -print"; if [ "${*#-print}" != "$*" ]; then action
=""; fi
21 find $dirs '(' -path '*/.svn' -o -path '*/CVS' -o -path .git
')' -prune -o ${action:+\(} "$@" $action