X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fbuildor%2Ffind_in_code.sh;h=411f8cad732142cff033a68490d465e4ddfc75a4;hb=be45cf74769fb22a6082362b2292e689beada6e6;hp=cafe21013cc92d2df3e08de732ab24c555ab8872;hpb=906f177e13e46cd3c765441f9516efc29f6ce671;p=feisty_meow.git diff --git a/scripts/buildor/find_in_code.sh b/scripts/buildor/find_in_code.sh index cafe2101..411f8cad 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" \ @@ -22,4 +28,6 @@ find . -type f \( -iname "*" \ ! -iname "*.tar" \ ! -iname "*.tmp" \ ! -iname "*.zip" \) \ - -exec echo "\"{}\"" ';' | xargs grep -li "$seek" + -exec echo "\"{}\"" ';' | xargs grep -li "$seek" | grep -v "^\.[^\/]\|\/\." + +