take an optional target directory argument

This commit is contained in:
Josh Holtrop 2011-03-04 12:32:12 -05:00
parent a88c50569c
commit d02a150884

View File

@ -1,4 +1,8 @@
#!/bin/sh #!/bin/bash
define="$1" 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}