OSDN Git Service

Updated the sgrep tool so that is will treat Makefiles (.mk)
authorBenno Leslie <ben.leslie@gmail.com>
Fri, 27 Feb 2009 10:04:08 +0000 (21:04 +1100)
committerBenno Leslie <ben.leslie@gmail.com>
Fri, 27 Feb 2009 10:04:08 +0000 (21:04 +1100)
and shell scripts (.sh) as 'source' files.

envsetup.sh

index e20d684..17f9585 100644 (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