summaryrefslogtreecommitdiffstats
path: root/tools/findunused/findunusedstrings
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-03 18:28:16 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-03 18:28:16 -0800
commitd4aee0c0caa00aa02d4c50ed28151591ac0456b5 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /tools/findunused/findunusedstrings
parentd2f2b1d7b77d06bce8cf9340171cf6c25cd720c4 (diff)
downloadandroid_development-d4aee0c0caa00aa02d4c50ed28151591ac0456b5.tar.gz
android_development-d4aee0c0caa00aa02d4c50ed28151591ac0456b5.tar.bz2
android_development-d4aee0c0caa00aa02d4c50ed28151591ac0456b5.zip
auto import from //depot/cupcake/@135843
Diffstat (limited to 'tools/findunused/findunusedstrings')
-rwxr-xr-xtools/findunused/findunusedstrings49
1 files changed, 0 insertions, 49 deletions
diff --git a/tools/findunused/findunusedstrings b/tools/findunused/findunusedstrings
deleted file mode 100755
index a54b0607f..000000000
--- a/tools/findunused/findunusedstrings
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/bin/bash
-
-if [ "$1" == "-h" ]
-then
- cat <<- EOH
- Usage: $0 [-p] [folder]
- -p option prints out unused strings, otherwise a total count is printed
- folder option causes only that app folder to be scanned, default is to scan all folders onder apps/
- EOH
- exit
-fi
-
-showall=no
-if [ "$1" == "-p" ]
-then
- showall=yes
- shift
-fi
-
-apps=$1
-if [ "$apps" == "" ]
-then
- apps=$ANDROID_BUILD_TOP/packages/apps/*
-fi
-
-for app in $apps
-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)
- do
- echo $i $(grep -Rw R.plurals.$i\\\|R.string.$i\\\|@string/$i .|wc -l)
- done | grep ' 0$' | {
- if [ "$showall" == "yes" ]
- then
- echo $app
- cat
- else
- count=$(wc -l)
- if [ "$count" != "0" ]
- then
- echo $app: $count unused strings
- fi
- fi
- }
- popd $app > /dev/null
- fi
-done