script to find unused sounds provided by TSC

This commit is contained in:
Gunter Labes 2006-06-20 23:30:18 +00:00
parent 5d92c35089
commit f09b011e84

11
utils/find-unused-sounds Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
# 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