fixed to not throw away matches that look like ./blah/XXX where the dot is definitely
[feisty_meow.git] / scripts / buildor / find_in_code.sh
index cafe21013cc92d2df3e08de732ab24c555ab8872..f479505ff2bcd00668bcc32eb45de076b317659a 100644 (file)
@@ -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" \
@@ -23,3 +29,6 @@ find . -type f \( -iname "*" \
   ! -iname "*.tmp" \
   ! -iname "*.zip" \) \
   -exec echo "\"{}\"" ';' | xargs grep -li "$seek" 
+#| grep -v "^\.[^\/]\|\/\."
+
+