#!/usr/bin/env bash DATA="../../dat/outfit.xml" echo "Checking for unused graphics.." echo # Check unused space gfx. echo " Unused outfit store gfx." cd store for SPACE in *.png; do if [ -z "`grep ${SPACE%.png} ../$DATA | grep ""`" ]; then echo " $SPACE" fi done cd .. # Check unused exteria gfx. echo " Unused outfit gfx" cd space for SPACE in *.png; do if [ -z "`grep ${SPACE%.png} ../$DATA | grep ""`" ]; then echo " $SPACE" fi done cd .. echo echo echo "Checking for overused graphics.." echo # Check overused. echo " Overused outfit store gfx" cd store for SPACE in *.png; do COUNT=`grep ${SPACE%.png} ../$DATA | grep -c ""` if [ $COUNT -gt 1 ]; then echo " $SPACE => $COUNT times" fi done cd .. # Check unused exteria gfx. echo " Overused outfit gfx" cd space for SPACE in *.png; do COUNT=`grep ${SPACE%.png} ../$DATA | grep -c ""` if [ $COUNT -gt 1 ]; then echo " $SPACE => $COUNT times" fi done cd ..