wesnoth/utils/find-unused-sounds
2006-06-20 23:30:18 +00:00

12 lines
460 B
Bash
Executable File

#!/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