From f312b7a1e93c40aa02297bf13990f3d3a4d7b81e Mon Sep 17 00:00:00 2001 From: bapt Date: Sun, 18 Dec 2016 02:02:33 +0000 Subject: [PATCH] Simplify extraction of static collation definition --- tools/tools/locale/tools/extract-colldef.awk | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/tools/tools/locale/tools/extract-colldef.awk b/tools/tools/locale/tools/extract-colldef.awk index 3f2924922fc1..de58fee16046 100644 --- a/tools/tools/locale/tools/extract-colldef.awk +++ b/tools/tools/locale/tools/extract-colldef.awk @@ -5,14 +5,8 @@ BEGIN { print "# from CLDR project data, obtained from http://cldr.unicode.org/" print "# -----------------------------------------------------------------------------" } -$1 == "comment_char" { print $0 } -$1 == "escape_char" { print $0 } -$1 == "LC_COLLATE" { - print $0 - while (getline line) { - print line - if (line == "END LC_COLLATE") { - break - } - } -} +$1 == "comment_char" { print } +$1 == "escape_char" { print } +$1 == "LC_COLLATE" { doprint = 1 } +doprint == 1 { print } +$1 == "END" && $2 == "LC_COLLATE" { exit 0 }