mirror of https://github.com/a2-4am/4cade.git
handle more DOS line endings (please continue not to ask)
This commit is contained in:
parent
f51db58911
commit
9576a45951
|
@ -45,7 +45,7 @@ fi
|
||||||
|
|
||||||
# make temp file with list of lines that contain keys
|
# make temp file with list of lines that contain keys
|
||||||
records=$(mktemp)
|
records=$(mktemp)
|
||||||
awk '!/^$|^#|^\[/' > "$records"
|
tr -d "\r" | awk '!/^$|^#|^\[/' > "$records"
|
||||||
|
|
||||||
# make temp assembly source file that represents the binary OKVS data structure
|
# make temp assembly source file that represents the binary OKVS data structure
|
||||||
source=$(mktemp)
|
source=$(mktemp)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# make temp file with just the key/value pairs (strip blank lines, comments, eof marker)
|
# make temp file with just the key/value pairs (strip blank lines, comments, eof marker)
|
||||||
records=$(mktemp)
|
records=$(mktemp)
|
||||||
awk '!/^$|^#|^\[/' > "$records"
|
tr -d "\r" | awk '!/^$|^#|^\[/' > "$records"
|
||||||
|
|
||||||
# make temp assembly source file that represents the binary OKVS data structure
|
# make temp assembly source file that represents the binary OKVS data structure
|
||||||
source=$(mktemp)
|
source=$(mktemp)
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
# make temp file with just the key/value pairs (strip blank lines, comments, eof marker)
|
# make temp file with just the key/value pairs (strip blank lines, comments, eof marker)
|
||||||
records=$(mktemp)
|
records=$(mktemp)
|
||||||
awk '!/^$|^#|^\[/' > "$records"
|
tr -d "\r" | awk '!/^$|^#|^\[/' > "$records"
|
||||||
|
|
||||||
# read logs of offsets & sizes for HGR and DHGR titles
|
# read logs of offsets & sizes for HGR and DHGR titles
|
||||||
# that were generated by an earlier script
|
# that were generated by an earlier script
|
||||||
|
|
|
@ -21,7 +21,7 @@ games=$(cat "$1")
|
||||||
|
|
||||||
# make temp file with just the key/value pairs (strip blank lines, comments, eof marker)
|
# make temp file with just the key/value pairs (strip blank lines, comments, eof marker)
|
||||||
records=$(mktemp)
|
records=$(mktemp)
|
||||||
awk '!/^$|^#|^\[/' > "$records"
|
tr -d "\r" | awk '!/^$|^#|^\[/' > "$records"
|
||||||
|
|
||||||
# make temp assembly source file that represents the binary OKVS data structure
|
# make temp assembly source file that represents the binary OKVS data structure
|
||||||
source=$(mktemp)
|
source=$(mktemp)
|
||||||
|
@ -35,7 +35,7 @@ source=$(mktemp)
|
||||||
if [ "$include_displayname" = false ]; then
|
if [ "$include_displayname" = false ]; then
|
||||||
displayname=""
|
displayname=""
|
||||||
else
|
else
|
||||||
displayname=$(echo "$line" | awk -F= '{ print $2 }')
|
displayname=$(echo "$line" | tr -d "\r" | awk -F= '{ print $2 }')
|
||||||
fi
|
fi
|
||||||
echo "!byte ${#key}+${#value}+${#displayname}+5" # OKVS record length
|
echo "!byte ${#key}+${#value}+${#displayname}+5" # OKVS record length
|
||||||
echo "!byte ${#key}" # OKVS key length
|
echo "!byte ${#key}" # OKVS key length
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
tr "\*\~\<\>\$\%" "\020\021\010\025\016\017" < "$1" | \
|
tr "\*\~\<\>\$\%" "\020\021\010\025\016\017" < "$1" | \
|
||||||
awk '!/^\[/ { printf "%c%s", length, $0 } END { printf "\xFF" }' > "$2"
|
tr -d "\r" | awk '!/^\[/ { printf "%c%s", length, $0 } END { printf "\xFF" }' > "$2"
|
||||||
|
|
Loading…
Reference in New Issue