File: findclassfiles

package info (click to toggle)
geos 3.14.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,212 kB
  • sloc: cpp: 199,103; xml: 56,065; ansic: 6,162; sh: 287; makefile: 26
file content (18 lines) | stat: -rwxr-xr-x 323 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

if test "x${1}" = "x"; then
	echo "Usage: $0 <classname> [<package>]" >&2
	exit 1
fi

classname="${1}"
package="."

if test "x${2}" != "x"; then
  package="${2}"
fi

# TODO: skip directory-only matches
find . -name '*.h' -o -name '*.inl' -o -name '*.cpp' \
  | grep -wi "${classname}" \
  | grep -i "${package}"