#!/usr/bin/env bash

if [ ! -z "$CHPL_HOME" ] ; then
    chapelDir="$CHPL_HOME"
else
    chapelDir="./"
fi

pushd $chapelDir > /dev/null

find test -wholename "*/.svn" -prune -o \( -name \*.good -o -name \*.bad \) -print0 | xargs -0 grep -H "$@"

popd > /dev/null
