#!/bin/sh
#
# A tiny utility that recursively greps through all the "real" C/C++ source
# files for a given regular expression, ignoring makefiles and other
# bits of the build infrastructure that could otherwise give noisy results.

find . '(' \
	-name "*.h" -o -name "*.c" -o \
	-name "*.hpp" -o -name "*.tcc" -o -name "*.cpp" ')' \
	-exec grep -e "$1" {} \; -print
