summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Chan <mchan@android.com>2010-02-19 15:32:44 -0800
committerMichael Chan <mchan@android.com>2010-02-19 15:48:08 -0800
commit8d014167ecb6b3d5e85f4945cae2256e0ddbf758 (patch)
treef9fe8afd8bf26b1a83ccbba786c6acc4054a2ac5
parenta4707b1709b7ca7391d6bdc2bb7cf7ff4a92c5a3 (diff)
downloadandroid_development-8d014167ecb6b3d5e85f4945cae2256e0ddbf758.tar.gz
android_development-8d014167ecb6b3d5e85f4945cae2256e0ddbf758.tar.bz2
android_development-8d014167ecb6b3d5e85f4945cae2256e0ddbf758.zip
Modified to work with Mac. Apparently the | operator doesn't work in sed.
Change-Id: I4d29f7f13e08b8daacc2aeb661774d4ba23ec2d1
-rwxr-xr-xtools/findunused/findunusedstrings3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/findunused/findunusedstrings b/tools/findunused/findunusedstrings
index 705752728..9615abcc3 100755
--- a/tools/findunused/findunusedstrings
+++ b/tools/findunused/findunusedstrings
@@ -28,7 +28,8 @@ do
if [ -d $app/res ]
then
pushd $app > /dev/null
- for i in $(grep -Rs "\(string\|plurals\) name=" res | sed 's/.*<\(string\|plurals\) name="//'|sed 's/".*$//'|sort -u)
+ # Two sed's were needed because the | operator is not supported on the mac
+ for i in $(grep -Rs "\(string\|plurals\) name=" res | sed 's/.*string name=\"//' | sed 's/.*plurals name=\"//'|sed 's/".*$//'|sort -u)
do
echo $i $(grep -Rws R.plurals.$i\\\|R.string.$i\\\|@string/$i .|wc -l)
done | grep ' 0$' | {