#!/bin/sh

propfile=$1
props=`awk -F= '{print $1}' $propfile`
count=0
total=0

echo "These property keys were not found in the code base:" 
for prop in $props
do
 #echo "Looking for property: $prop"
 if [ ! -z "$prop" ];
 then
   total=`expr $total + 1`
   output=`grep --exclude-dir=".svn" -re "[\'\"]$prop[\'\"]" *`
   if [ -z "$output" ];
   then
     echo "$prop"
     count=`expr $count + 1`
   fi
 fi
done

echo "done! Found $count possibly uneeded message keys in $propfile (out of $total total keys)"

