firejail/ci/check/profiles/sort-firecfg.config.sh
Kelvin M. Klann ac2bd3211d 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.
2023-08-05 17:17:15 -03:00

5 lines
131 B
Bash
Executable file

#!/bin/sh
# See ../../../src/firecfg/firecfg.config
sed -E -e '/^#$/d' -e '/^# /d' -e 's/^#([^ ])/\1/' "$1" |
LC_ALL=C sort -c -u