mirror of
https://github.com/a2-4am/4cade.git
synced 2024-12-26 04:33:10 +00:00
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
|
||||
records=$(mktemp)
|
||||
awk '!/^$|^#|^\[/' > "$records"
|
||||
tr -d "\r" | awk '!/^$|^#|^\[/' > "$records"
|
||||
|
||||
# make temp assembly source file that represents the binary OKVS data structure
|
||||
source=$(mktemp)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# make temp file with just the key/value pairs (strip blank lines, comments, eof marker)
|
||||
records=$(mktemp)
|
||||
awk '!/^$|^#|^\[/' > "$records"
|
||||
tr -d "\r" | awk '!/^$|^#|^\[/' > "$records"
|
||||
|
||||
# make temp assembly source file that represents the binary OKVS data structure
|
||||
source=$(mktemp)
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
# make temp file with just the key/value pairs (strip blank lines, comments, eof marker)
|
||||
records=$(mktemp)
|
||||
awk '!/^$|^#|^\[/' > "$records"
|
||||
tr -d "\r" | awk '!/^$|^#|^\[/' > "$records"
|
||||
|
||||
# read logs of offsets & sizes for HGR and DHGR titles
|
||||
# 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)
|
||||
records=$(mktemp)
|
||||
awk '!/^$|^#|^\[/' > "$records"
|
||||
tr -d "\r" | awk '!/^$|^#|^\[/' > "$records"
|
||||
|
||||
# make temp assembly source file that represents the binary OKVS data structure
|
||||
source=$(mktemp)
|
||||
@ -35,7 +35,7 @@ source=$(mktemp)
|
||||
if [ "$include_displayname" = false ]; then
|
||||
displayname=""
|
||||
else
|
||||
displayname=$(echo "$line" | awk -F= '{ print $2 }')
|
||||
displayname=$(echo "$line" | tr -d "\r" | awk -F= '{ print $2 }')
|
||||
fi
|
||||
echo "!byte ${#key}+${#value}+${#displayname}+5" # OKVS record length
|
||||
echo "!byte ${#key}" # OKVS key length
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
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
Block a user