From a6454ae6af722fb0a7d738eba4244088d003b4c3 Mon Sep 17 00:00:00 2001 From: 4am Date: Fri, 22 Oct 2021 16:04:14 -0400 Subject: [PATCH] more idiomatic awk FML --- Makefile | 4 ++-- bin/buildindexedfile.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b1c28af2a..a5f66433b 100644 --- a/Makefile +++ b/Makefile @@ -49,11 +49,11 @@ dsk: asm # # create distribution version of GAMES.CONF without comments or blank lines # - awk '!/^$$|^#/ { print }' < res/GAMES.CONF > build/GAMES.CONF + awk '!/^$$|^#/' < res/GAMES.CONF > build/GAMES.CONF # # create a sorted list of game filenames, without metadata or display names # - awk -F "," '{ print $$2 }' < build/GAMES.CONF | awk -F "=" '{ print $$1 }' | sort > build/GAMES.SORTED + awk -F, '/,/ { print $$2 }' < build/GAMES.CONF | awk -F= '{ print $$1 }' | sort > build/GAMES.SORTED # # precompute indexed files for prelaunch # note: prelaunch must be first in TOTAL.DATA due to a hack in LoadStandardPrelaunch diff --git a/bin/buildindexedfile.sh b/bin/buildindexedfile.sh index decba6ef7..c940bf88c 100755 --- a/bin/buildindexedfile.sh +++ b/bin/buildindexedfile.sh @@ -39,7 +39,7 @@ fi # make temp file with list of lines that contain keys records=$(mktemp) -awk '!/^$|^#|^\[/ { print }' < "$1" > "$records" +awk '!/^$|^#|^\[/' < "$1" > "$records" # make temp assembly source file that represents the binary OKVS data structure source=$(mktemp)