diff --git a/bin/buildindexedfile.sh b/bin/buildindexedfile.sh index 359946cef..bb82191b5 100755 --- a/bin/buildindexedfile.sh +++ b/bin/buildindexedfile.sh @@ -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) diff --git a/bin/buildokvs.sh b/bin/buildokvs.sh index ee83cdbb1..08d768e10 100755 --- a/bin/buildokvs.sh +++ b/bin/buildokvs.sh @@ -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) diff --git a/bin/buildsearch.sh b/bin/buildsearch.sh index 27a47d579..9a651b282 100755 --- a/bin/buildsearch.sh +++ b/bin/buildsearch.sh @@ -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 diff --git a/bin/buildslideshow.sh b/bin/buildslideshow.sh index 80a11878b..b67c1940c 100755 --- a/bin/buildslideshow.sh +++ b/bin/buildslideshow.sh @@ -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 diff --git a/bin/converthelp.sh b/bin/converthelp.sh index 0693ec856..2bdf999bf 100755 --- a/bin/converthelp.sh +++ b/bin/converthelp.sh @@ -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"