OSDN Git Service

Add 's' option to grep so it doesn't complain about stuff under .git
authorMarco Nelissen <marcone@google.com>
Fri, 19 Feb 2010 18:59:54 +0000 (10:59 -0800)
committerMarco Nelissen <marcone@google.com>
Fri, 19 Feb 2010 18:59:54 +0000 (10:59 -0800)
tools/findunused/findunusedstrings

index a54b060..7057527 100755 (executable)
@@ -28,9 +28,9 @@ do
     if [ -d $app/res ]
     then
         pushd $app > /dev/null
-        for i in $(grep -R "\(string\|plurals\) name=" res | sed 's/.*<\(string\|plurals\) name="//'|sed 's/".*$//'|sort -u)
+        for i in $(grep -Rs "\(string\|plurals\) name=" res | sed 's/.*<\(string\|plurals\) name="//'|sed 's/".*$//'|sort -u)
         do
-            echo $i $(grep -Rw R.plurals.$i\\\|R.string.$i\\\|@string/$i .|wc -l)
+            echo $i $(grep -Rws R.plurals.$i\\\|R.string.$i\\\|@string/$i .|wc -l)
         done | grep ' 0$' | {
             if [ "$showall" == "yes" ]
             then