* updated gtk (4.14.4 -> 4.15.2)
[t2sde.git] / scripts / xfind.sh
blob2d259cb772c13f41326c98b3a43b030f8d109bd0
1 #!/usr/bin/env bash
2 # --- T2-COPYRIGHT-NOTE-BEGIN ---
3 # T2 SDE: scripts/xfind.sh
4 # Copyright (C) 2004 - 2023 The T2 SDE Project
5 #
6 # This Copyright note is generated by scripts/Create-CopyPatch,
7 # more information can be found in the files COPYING and README.
8 #
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
16 # "tac" or "sort -r".
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