updated to ignore svn entries file, plus sorted the list to make easier to add.
[feisty_meow.git] / scripts / buildor / find_in_code.sh
1 #!/bin/bash
2 seek="$1"; shift
3 if [ -z "$seek" ]; then
4   echo This script needs a pattern to look for in the current directory.
5   echo All code files here and in subdirectories will be searched for the
6   echo pattern.
7   exit 1
8 fi
9
10 find . -type f \( -iname "*" \
11   ! -iname "*.class" \
12   ! -iname "*.dll" \
13   ! -iname "*.exe" \
14   ! -iname "entries" \
15   ! -iname "*.git" \
16   ! -iname "*.gz" \
17   ! -iname "*.jar" \
18   ! -iname "*.lib" \
19   ! -iname "*.obj" \
20   ! -iname "*.svn" \
21   ! -iname "*.svn-base" \
22   ! -iname "*.tar" \
23   ! -iname "*.zip" \) \
24   -exec echo "\"{}\"" ';' | xargs grep -li "$seek"