From: Chris Koeritz Date: Thu, 7 Feb 2013 19:43:46 +0000 (-0500) Subject: fixed to allow a target directory for searching to also be passed on command line. X-Git-Tag: 2.140.90~1119 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=3ce3dfb9b88a29a8a406377143279a324cd9d4d5;p=feisty_meow.git fixed to allow a target directory for searching to also be passed on command line. --- diff --git a/scripts/buildor/find_in_code.sh b/scripts/buildor/find_in_code.sh index cafe2101..c57c6fce 100644 --- a/scripts/buildor/find_in_code.sh +++ b/scripts/buildor/find_in_code.sh @@ -6,8 +6,14 @@ if [ -z "$seek" ]; then echo pattern. exit 1 fi +#hmmm: might be nice to support multiple directories... +# just need to pass them to find as an array maybe? +dir="$1"; shift +if [ -z "$dir" ]; then + dir=. +fi -find . -type f \( -iname "*" \ +find "$dir" -type f \( -iname "*" \ ! -iname "*.class" \ ! -iname "*.dll" \ ! -iname "*.exe" \