Annotation of annozilla/src/unused-entities.sh, revision 1.1

1.1     ! matthew     1: #!/bin/bash
        !             2: 
        !             3: # Sample usage: ./unused-entities.sh locale/en-US/annozilla/ content/
        !             4: 
        !             5: echo "Unused entities:"
        !             6: 
        !             7: for dtdfile in `ls $1*.dtd`
        !             8: do
        !             9:        awk '/<!ENTITY/ {print $2}' < $dtdfile | while read line
        !            10:        do
        !            11:                search=`grep -R "${line}" "$2"`
        !            12:                if [ "$search" == "" ]
        !            13:                then
        !            14:                        echo "${line}";
        !            15:                fi
        !            16:        done;
        !            17: done;
        !            18: 
        !            19: echo ""
        !            20: echo "Unused properties:"
        !            21: 
        !            22: for propfile in `ls $1*.properties`
        !            23: do
        !            24:        awk -F "=" '{if (!($2 == "")) { print $1 }}' < $propfile | while read line
        !            25:        do
        !            26:                search=`grep -R "${line}" "$2"`
        !            27:                if [ "$search" == "" ]
        !            28:                then
        !            29:                        echo "${line}";
        !            30:                fi
        !            31:        done;
        !            32: done;
        !            33: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>