Delete find-unused-images and find-unused-sounds.

The macroscope tool is now more than good enough to supersede them.
This commit is contained in:
Eric S. Raymond 2007-04-09 18:23:33 +00:00
parent 9333ffe402
commit 65bfe50ec2
3 changed files with 2 additions and 40 deletions

View file

@ -103,6 +103,8 @@ Version 1.3.1+svn:
* The Perl random map generator (unmaintained since 2003, only
generated old-style single-letter maps) has been removed.
* New tool, macroscope, generates cross-reference reports on macro usage.
* The old find-unused-images and find-unused-sounds svripts are deleted
(replaced by macroscope).
* miscellanous changes and bug fixes
* a friendly healer will now stop poisoned unit to lose HP
* a unit that dies while attacking will now correctly play its own death

View file

@ -1,24 +0,0 @@
#!/bin/sh
# NOTE: THIS TOOL IS DEPRECATED. DO NOT RELY ON IT.
# Attempt to identify images that are not used.
# Must be run from the top level of the Wesnoth source directory.
# this is a helper script for the Battle for Wesnoth project
# see http://www.wesnoth.org/
# this script is distributed on the same terms as Battle for Wesnoth itself
# note that many images (eg. for terrains) are actually referenced,
# but the image filename is constructed programmatically so it's not
# easy to auto-detect these
TM=tmp-all.$$
TMU=tmp-used.$$
find images -name '*.png' -print | sort -u | sed -e 's/^images\///' > $TM
fgrep -r .png data | sed -e 's/.* \([^ ]*\.png\)/\1/' -e 's/.*=\([^ ]*\.png\)/\1/' -e 's/(\([^)]*\))/\1/' -e 's/\"\(.*\)\"/\1/' -e 's/\.png .*/.png/' -e 's/\.png\".*/.png/' -e 's/\"//' -e 's/[ ]*//g' -e 's/:[0-9]*//g' -e 's/,$//' -e 's/,/ /g' | perl -p -e 's/ /\n/g' | sort -u > $TMU
diff -u -U 0 $TMU $TM | grep -v '^@@'
rm -f $TM $TMU

View file

@ -1,16 +0,0 @@
#!/bin/sh
# NOTE: THIS TOOL IS DEPRECATED. DO NOT RELY ON IT.
# Find sound files that are shipped but not used in mainline campaigns.
# Must be run from the top level of the Wesnoth source directory.
# Changing the commas to newlines is a hack to handle the lists used in data/sound-utils.cfg.
find -name '*.cfg' | xargs egrep '\.wav|\.ogg' | tr ',' '\n' | perl -e 'while(<>){/([a-zA-Z0-9_-]*(\.ogg|\.wav))/; print "$1\n";}' | sort | uniq > tmp-referenced-sounds-list
ls sounds > tmp-sound-list
ls music > tmp-music-list
cat tmp-sound-list tmp-music-list | sort | uniq > tmp-all-sounds-list
diff -u tmp-referenced-sounds-list tmp-all-sounds-list