mirror of
https://github.com/a2-4am/4cade.git
synced 2024-12-26 04:33:10 +00:00
handle DOS line endings (don't ask)
This commit is contained in:
parent
da44e8063e
commit
f51db58911
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user