take an optional target directory argument

This commit is contained in:
Josh Holtrop committed 2011-03-04 12:32:12 -05:00
1 parent a88c50569c
commit d02a150884
1 file changed
+6 -2
+6 -2
View File
@@ -1,4 +1,8 @@
#!/bin/sh
#!/bin/bash
define="$1"
exec grep --exclude-dir .svn --color=auto -R "define *\\<${define}\\>" .
where="$2"
if [[ "x$where" == "x" ]]; then
where=.
fi
exec grep --exclude-dir .svn --color=auto -R "define *\\<${define}\\>" ${where}