handle DOS line endings (don't ask)

This commit is contained in:
4am 2022-07-29 19:53:56 -04:00
parent da44e8063e
commit f51db58911
2 changed files with 16 additions and 4 deletions

View File

@ -11,6 +11,7 @@ check_slideshow() {
[ -f "$1" ] ||
fatal_error "Can't find slideshow" "$1"
cat "$1" |
tr -d "\r" |
grep -v "^#" |
grep -v "^\[" |
grep -v "^$" |
@ -28,6 +29,7 @@ check_slideshow() {
# fatal error if an attract mode module is listed more than once
dupes=$(cat res/ATTRACT.CONF |
tr -d "\r" |
grep -v "^#" |
grep -v "^$" |
sort |
@ -37,6 +39,7 @@ if [[ $dupes ]]; then
fi
cat res/GAMES.CONF |
tr -d "\r" |
grep -v "^#" |
grep -v "^\[" |
grep -v "^$" |
@ -45,6 +48,7 @@ cat res/GAMES.CONF |
# warn about unused self-running demos
cat res/DEMO/_FileInformation.txt |
tr -d "\r" |
grep "Type(06)" |
grep -v "SPCARTOON" |
cut -d"=" -f1 |
@ -60,6 +64,7 @@ done
cd ../..
cat res/ATTRACT.CONF |
tr -d "\r" |
grep "=" |
grep -v "^#" |
while read line; do

View File

@ -3,6 +3,7 @@
# run from project root directory
cat res/GAMES.CONF |
tr -d "\r" |
grep "," |
grep -v "^#" |
cut -d"," -f2 |
@ -13,6 +14,7 @@ cat res/GAMES.CONF |
# add box art, if any
cat res/SS/SHR*.CONF |
tr -d "\r" |
egrep "(^|=)""$game""$" |
cut -d"=" -f1 |
sed -e "s/$/=C/g" |
@ -21,6 +23,7 @@ cat res/GAMES.CONF |
# add DHGR action screenshots, if any
cat res/SS/ACTDHGR*.CONF |
tr -d "\r" |
egrep "(^|=)""$game""$" |
cut -d"=" -f1 |
sed -e "s/$/=B/g" |
@ -29,6 +32,7 @@ cat res/GAMES.CONF |
# add HGR action screenshots, if any
cat res/SS/ACTION*.CONF |
tr -d "\r" |
egrep "(^|=)""$game""$" |
cut -d"=" -f1 |
sed -e "s/$/=A/g" |
@ -37,6 +41,7 @@ cat res/GAMES.CONF |
# add GR action screenshots, if any
cat res/SS/ACTGR*.CONF |
tr -d "\r" |
egrep "(^|=)""$game""$" |
cut -d"=" -f1 |
sed -e "s/$/=D/g" |
@ -45,6 +50,7 @@ cat res/GAMES.CONF |
# add DGR action screenshots, if any
cat res/SS/ACTDGR*.CONF |
tr -d "\r" |
egrep "(^|=)""$game""$" |
cut -d"=" -f1 |
sed -e "s/$/=E/g" |
@ -53,6 +59,7 @@ cat res/GAMES.CONF |
# add self-running demo, if any
cat res/ATTRACT.CONF |
tr -d "\r" |
grep "^$game=0" >> /tmp/g
if [ "$game" == "SPARE.CHANGE" ]; then