Updated the sgrep tool so that is will treat Makefiles (.mk)

and shell scripts (.sh) as 'source' files.
This commit is contained in:
Benno Leslie 2009-02-27 21:04:08 +11:00
parent 2f49d59369
commit 5ef878ac38
1 changed files with 2 additions and 2 deletions

View File

@ -747,14 +747,14 @@ case `uname -s` in
Darwin)
function sgrep()
{
find -E . -type f -iregex '.*\.(c|h|cpp|S|java|xml)' -print0 | xargs -0 grep --color -n "$@"
find -E . -type f -iregex '.*\.(c|h|cpp|S|java|xml|sh|mk)' -print0 | xargs -0 grep --color -n "$@"
}
;;
*)
function sgrep()
{
find . -type f -iregex '.*\.\(c\|h\|cpp\|S\|java\|xml\)' -print0 | xargs -0 grep --color -n "$@"
find . -type f -iregex '.*\.\(c\|h\|cpp\|S\|java\|xml\|sh\|mk\)' -print0 | xargs -0 grep --color -n "$@"
}
;;
esac