name change since the old one was obnoxious and in three parts.
authorChris Koeritz <fred@gruntose.com>
Fri, 29 Mar 2013 03:00:00 +0000 (23:00 -0400)
committerChris Koeritz <fred@gruntose.com>
Fri, 29 Mar 2013 03:00:00 +0000 (23:00 -0400)
scripts/archival/find_in_arch.sh [deleted file]
scripts/archival/search_arch.sh [new file with mode: 0644]
scripts/buildor/find_in_code.sh [deleted file]
scripts/buildor/search_code.sh [new file with mode: 0644]

diff --git a/scripts/archival/find_in_arch.sh b/scripts/archival/find_in_arch.sh
deleted file mode 100644 (file)
index 999a7fb..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-##############
-# Name   : find_in_arch
-# Author : Chris Koeritz
-# Rights : Copyright (C) 2012-$now by Feisty Meow Concerns, Ltd.
-##############
-# This script is free software; you can modify/redistribute it under the terms
-# of the GNU General Public License. [ http://www.gnu.org/licenses/gpl.html ]
-# Feel free to send updates to: [ fred@gruntose.com ]
-##############
-#
-# scours through the archive files (tar, zip, etc) in a directory looking for a pattern
-# in the file.  any matches are reported.
-
-pattern="$1"; shift
-dir="$1"; shift
-
-if [ -z "$dir" -o -z "$pattern" ]; then
-  echo This utility requires a pattern string that will be sought within a
-  echo directory, and the directory to scan.  Any matches are reported.
-  exit 1
-fi
-
-TMPFILE="$(mktemp "$TMP/jarfinding.XXXXXX")"
-
-#hmmm: below would be nicer if we had a util that told us all the types of archives
-#      that we support.  then we could just skim across those types.
-
-# locate all the archive files under the path.
-find "$dir" -iname "*.jar" -o -iname "*.zip" -o -iname "*.tar" \
-  -o -iname "*.iar" -o -iname "*.oar" \
-  >"$TMPFILE"
-
-while read line; do
-  bash $FEISTY_MEOW_SCRIPTS/archival/listarch.sh "$line" 2>&1 | grep -i "$pattern" >/dev/null
-  if [ $? -eq 0 ]; then echo ==== Found pattern in $line ====; fi
-done <"$TMPFILE"
-
-\rm -f "$TMPFILE"
-
-
diff --git a/scripts/archival/search_arch.sh b/scripts/archival/search_arch.sh
new file mode 100644 (file)
index 0000000..999a7fb
--- /dev/null
@@ -0,0 +1,41 @@
+#!/bin/bash
+##############
+# Name   : find_in_arch
+# Author : Chris Koeritz
+# Rights : Copyright (C) 2012-$now by Feisty Meow Concerns, Ltd.
+##############
+# This script is free software; you can modify/redistribute it under the terms
+# of the GNU General Public License. [ http://www.gnu.org/licenses/gpl.html ]
+# Feel free to send updates to: [ fred@gruntose.com ]
+##############
+#
+# scours through the archive files (tar, zip, etc) in a directory looking for a pattern
+# in the file.  any matches are reported.
+
+pattern="$1"; shift
+dir="$1"; shift
+
+if [ -z "$dir" -o -z "$pattern" ]; then
+  echo This utility requires a pattern string that will be sought within a
+  echo directory, and the directory to scan.  Any matches are reported.
+  exit 1
+fi
+
+TMPFILE="$(mktemp "$TMP/jarfinding.XXXXXX")"
+
+#hmmm: below would be nicer if we had a util that told us all the types of archives
+#      that we support.  then we could just skim across those types.
+
+# locate all the archive files under the path.
+find "$dir" -iname "*.jar" -o -iname "*.zip" -o -iname "*.tar" \
+  -o -iname "*.iar" -o -iname "*.oar" \
+  >"$TMPFILE"
+
+while read line; do
+  bash $FEISTY_MEOW_SCRIPTS/archival/listarch.sh "$line" 2>&1 | grep -i "$pattern" >/dev/null
+  if [ $? -eq 0 ]; then echo ==== Found pattern in $line ====; fi
+done <"$TMPFILE"
+
+\rm -f "$TMPFILE"
+
+
diff --git a/scripts/buildor/find_in_code.sh b/scripts/buildor/find_in_code.sh
deleted file mode 100644 (file)
index 411f8ca..0000000
+++ /dev/null
@@ -1,33 +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
-
-find "$dir" -type f \( -iname "*" \
-  ! -iname "*.class" \
-  ! -iname "*.dll" \
-  ! -iname "*.exe" \
-  ! -iname "entries" \
-  ! -iname "*.git" \
-  ! -iname "*.gz" \
-  ! -iname "*.jar" \
-  ! -iname "*.lib" \
-  ! -iname "*.obj" \
-  ! -iname "*.svn" \
-  ! -iname "*.svn-base" \
-  ! -iname "*.tar" \
-  ! -iname "*.tmp" \
-  ! -iname "*.zip" \) \
-  -exec echo "\"{}\"" ';' | xargs grep -li "$seek" | grep -v "^\.[^\/]\|\/\."
-
-
diff --git a/scripts/buildor/search_code.sh b/scripts/buildor/search_code.sh
new file mode 100644 (file)
index 0000000..411f8ca
--- /dev/null
@@ -0,0 +1,33 @@
+#!/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
+
+find "$dir" -type f \( -iname "*" \
+  ! -iname "*.class" \
+  ! -iname "*.dll" \
+  ! -iname "*.exe" \
+  ! -iname "entries" \
+  ! -iname "*.git" \
+  ! -iname "*.gz" \
+  ! -iname "*.jar" \
+  ! -iname "*.lib" \
+  ! -iname "*.obj" \
+  ! -iname "*.svn" \
+  ! -iname "*.svn-base" \
+  ! -iname "*.tar" \
+  ! -iname "*.tmp" \
+  ! -iname "*.zip" \) \
+  -exec echo "\"{}\"" ';' | xargs grep -li "$seek" | grep -v "^\.[^\/]\|\/\."
+
+