From: Chris Koeritz Date: Fri, 8 Nov 2013 02:50:37 +0000 (-0500) Subject: a better name. X-Git-Tag: 2.140.90~888 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=5a328b8c4cb42336c63fd435f7beb8cd8bb5ae6d;p=feisty_meow.git a better name. --- diff --git a/scripts/buildor/search_code.sh b/scripts/buildor/search_code.sh deleted file mode 100644 index 9aed0772..00000000 --- a/scripts/buildor/search_code.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -seek="$1"; shift -if [ -z "$seek" ]; then - echo This script needs a pattern to look for in the current directory. - echo All code files here and in subdirectories will be searched for the - 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 - -#hmmm: we need to encode this useful logic as a list of binary file endings. -find "$dir" -type f \( -iname "*" \ - ! -iname "*~" \ - ! -iname "*.bin" \ - ! -iname "*.bz2" \ - ! -iname "*.class" \ - ! -iname "*.dll" \ - ! -iname "*.deb" \ - ! -iname "*.dmg" \ - ! -iname "*.exe" \ - ! -iname "entries" \ - ! -iname "*.git" \ - ! -iname "*.gz" \ - ! -iname "*.iar" \ - ! -iname "*.jar" \ - ! -iname "*.lib" \ - ! -iname "*.ncb" \ - ! -iname "*.oar" \ - ! -iname "*.obj" \ - ! -iname "*.pch" \ - ! -iname "*.png" \ - ! -iname "*.snarf" \ - ! -iname "*.so" \ - ! -iname "*.so.2" \ - ! -iname "*.svn" \ - ! -iname "*.svn-base" \ - ! -iname "*.tar" \ - ! -iname "*.tmp" \ - ! -iname "*.zip" \) \ - -exec echo "\"{}\"" ';' | xargs grep -li "$seek" | grep -v "^\.[^\/]\|\/\." - - diff --git a/scripts/text/search_text.sh b/scripts/text/search_text.sh new file mode 100644 index 00000000..e88c58d8 --- /dev/null +++ b/scripts/text/search_text.sh @@ -0,0 +1,49 @@ +#!/bin/bash +seek="$1"; shift +if [ -z "$seek" ]; then + echo This script needs a pattern to look for in the current directory. + echo All non-binary files here and in subdirectories will be searched for the + echo pattern. + echo A directory can be passed as an optional second parameter, which will + echo cause the search to occur in that directory instead. + 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 + +#hmmm: we need to encode this useful logic as a list of binary file endings. +find "$dir" -type f \( -iname "*" \ + ! -iname "*~" \ + ! -iname "*.bin" \ + ! -iname "*.bz2" \ + ! -iname "*.class" \ + ! -iname "*.dll" \ + ! -iname "*.deb" \ + ! -iname "*.dmg" \ + ! -iname "*.exe" \ + ! -iname "entries" \ + ! -iname "*.git" \ + ! -iname "*.gz" \ + ! -iname "*.iar" \ + ! -iname "*.jar" \ + ! -iname "*.lib" \ + ! -iname "*.ncb" \ + ! -iname "*.oar" \ + ! -iname "*.obj" \ + ! -iname "*.pch" \ + ! -iname "*.png" \ + ! -iname "*.snarf" \ + ! -iname "*.so" \ + ! -iname "*.so.2" \ + ! -iname "*.svn" \ + ! -iname "*.svn-base" \ + ! -iname "*.tar" \ + ! -iname "*.tmp" \ + ! -iname "*.zip" \) \ + -exec echo "\"{}\"" ';' | xargs grep -li "$seek" | grep -v "^\.[^\/]\|\/\." + +