From ac2bd3211d02587b5e5b61b1f2f931d1f9e2a0ed Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Sat, 5 Aug 2023 15:54:33 -0300 Subject: build: use ASCII sort on firecfg and check for duplicates Currently the CI check does not consider certain special characters (such as `-`) when sorting due to `sort -d`. So remove `-d`, sort firecfg using `LC_ALL=C` and enforce that order. Also add `sort -u` to check for duplicates. This also allows the CI check to ignore normal comments (lines starting with `# `) anywhere in the file. Relates to #4643. --- ci/check/profiles/sort-firecfg.config.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ci/check/profiles') diff --git a/ci/check/profiles/sort-firecfg.config.sh b/ci/check/profiles/sort-firecfg.config.sh index 17a595350..dbfbf24f5 100755 --- a/ci/check/profiles/sort-firecfg.config.sh +++ b/ci/check/profiles/sort-firecfg.config.sh @@ -1,2 +1,5 @@ #!/bin/sh -tail -n +4 "$1" | sed 's/^# /#/' | LC_ALL=C sort -c -d +# See ../../../src/firecfg/firecfg.config + +sed -E -e '/^#$/d' -e '/^# /d' -e 's/^#([^ ])/\1/' "$1" | +LC_ALL=C sort -c -u -- cgit v1.2.3-54-g00ecf