[Add] Bash script for checking outfit graphics usage.
This commit is contained in:
parent
18e4d9088c
commit
b7ee0eb32a
54
gfx/outfit/check.sh
Executable file
54
gfx/outfit/check.sh
Executable file
@ -0,0 +1,54 @@
|
||||
#!/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 "<gfx_store>"`" ]; 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 "<gfx>"`" ]; 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 "<gfx_store>"`
|
||||
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 "<gfx>"`
|
||||
if [ $COUNT -gt 1 ]; then
|
||||
echo " $SPACE => $COUNT times"
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
|
Loading…
Reference in New Issue
Block a user