Created
November 3, 2015 00:22
-
-
Save zbraniecki/18659451d1a05bd54177 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "========= Apps ===============" | |
dir=/Users/zbraniecki/projects/gaia/apps | |
DIRS=`ls -l $dir | egrep '^d' | awk '{print $9}'` | |
st1tot=0 | |
st2tot=0 | |
st3tot=0 | |
stsumtot=0 | |
for i in $DIRS; do | |
cd $dir/$i | |
st1=$(grep -I -r "[^\^a-zA-Z0-9_\)]_(" ./|wc -l) | |
st2=$(grep -I -r "mozL10n.get[^A]" ./|wc -l) | |
st3=$(grep -I -r "[^z][lL]10n.get[^A]" ./|wc -l) | |
st1tot=$((st1tot + st1)) | |
st2tot=$((st2tot + st2)) | |
st3tot=$((st3tot + st3)) | |
stsum=$((st1 + st2 + st3)) | |
stsumtot=$((stsumtot + stsum)) | |
if [ $stsum -ne 0 ] | |
then | |
echo "$i: $stsum" | |
fi | |
sleep 0 | |
done | |
echo "================================" | |
echo "Total Apps: $stsumtot" | |
echo "" | |
echo "" | |
echo "======== Shared ==============" | |
dir=/Users/zbraniecki/projects/gaia/shared | |
DIRS=`ls -l $dir | egrep '^d' | awk '{print $9}'` | |
st1tot=0 | |
st2tot=0 | |
st3tot=0 | |
stsumtot=0 | |
for i in $DIRS; do | |
cd $dir/$i | |
st1=$(grep -I -r "[^\^a-zA-Z0-9_\)]_(" ./|wc -l) | |
st2=$(grep -I -r "mozL10n.get[^A]" ./|wc -l) | |
st3=$(grep -I -r "[^z][lL]10n.get[^A]" ./|wc -l) | |
st1tot=$((st1tot + st1)) | |
st2tot=$((st2tot + st2)) | |
st3tot=$((st3tot + st3)) | |
stsum=$((st1 + st2 + st3)) | |
stsumtot=$((stsumtot + stsum)) | |
if [ $stsum -ne 0 ] | |
then | |
echo "$i: $stsum" | |
fi | |
sleep 0 | |
done | |
echo "================================" | |
echo "Total Shared: $stsumtot" | |
echo "" | |
echo "" | |
echo "======== TV Apps =============" | |
dir=/Users/zbraniecki/projects/gaia/tv_apps | |
DIRS=`ls -l $dir | egrep '^d' | awk '{print $9}'` | |
st1tot=0 | |
st2tot=0 | |
st3tot=0 | |
stsumtot=0 | |
for i in $DIRS; do | |
cd $dir/$i | |
st1=$(grep -I -r "[^\^a-zA-Z0-9_\)]_(" ./|wc -l) | |
st2=$(grep -I -r "mozL10n.get[^A]" ./|wc -l) | |
st3=$(grep -I -r "[^z][lL]10n.get[^A]" ./|wc -l) | |
st1tot=$((st1tot + st1)) | |
st2tot=$((st2tot + st2)) | |
st3tot=$((st3tot + st3)) | |
stsum=$((st1 + st2 + st3)) | |
stsumtot=$((stsumtot + stsum)) | |
if [ $stsum -ne 0 ] | |
then | |
echo "$i: $stsum" | |
fi | |
sleep 0 | |
done | |
echo "================================" | |
echo "Total TV Apps: $stsumtot" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment