check for duplicate modules

This commit is contained in:
4am 2021-02-18 17:50:02 -05:00
parent 9b49405acf
commit cece2dde1d

View File

@ -39,6 +39,16 @@ check_action_slideshow() {
done
}
# fatal error if an attract mode module is listed more than once
dupes=$(cat res/ATTRACT.CONF |
grep -v "^#" |
grep -v "^$" |
sort |
uniq -d)
if [[ $dupes ]]; then
fatal_error "Duplicate ATTRACT.CONF module:" "$dupes"
fi
cat res/GAMES.CONF |
grep -v "^#" |
grep -v "^\[" |
@ -46,6 +56,15 @@ cat res/GAMES.CONF |
cut -d"," -f2 |
cut -d"=" -f1 > /tmp/games
# warn about unused self-running demos
cat res/DEMO/_FileInformation.txt |
grep "Type(06)" |
grep -v "SPCARTOON" |
cut -d"=" -f1 |
while read f; do
grep "$f=0" res/ATTRACT.CONF >/dev/null || echo "unused demo: $f";
done
cat res/ATTRACT.CONF |
grep "=" |
grep -v "^#" |