diff options
author | Michael Chan <mchan@android.com> | 2010-02-19 15:32:44 -0800 |
---|---|---|
committer | Michael Chan <mchan@android.com> | 2010-02-19 15:48:08 -0800 |
commit | 8d014167ecb6b3d5e85f4945cae2256e0ddbf758 (patch) | |
tree | f9fe8afd8bf26b1a83ccbba786c6acc4054a2ac5 | |
parent | a4707b1709b7ca7391d6bdc2bb7cf7ff4a92c5a3 (diff) | |
download | android_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-x | tools/findunused/findunusedstrings | 3 |
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$' | { |