diff options
author | 2023-08-05 15:54:33 -0300 | |
---|---|---|
committer | 2023-08-05 17:17:15 -0300 | |
commit | ac2bd3211d02587b5e5b61b1f2f931d1f9e2a0ed (patch) | |
tree | 2fb46cca6c85d61dd37520610aa976528bd77484 /ci | |
parent | build: improve comments in firecfg.config (diff) | |
download | firejail-ac2bd3211d02587b5e5b61b1f2f931d1f9e2a0ed.tar.gz firejail-ac2bd3211d02587b5e5b61b1f2f931d1f9e2a0ed.tar.zst firejail-ac2bd3211d02587b5e5b61b1f2f931d1f9e2a0ed.zip |
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.
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/check/profiles/sort-firecfg.config.sh | 5 |
1 files changed, 4 insertions, 1 deletions
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 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | tail -n +4 "$1" | sed 's/^# /#/' | LC_ALL=C sort -c -d | 2 | # See ../../../src/firecfg/firecfg.config |
3 | |||
4 | sed -E -e '/^#$/d' -e '/^# /d' -e 's/^#([^ ])/\1/' "$1" | | ||
5 | LC_ALL=C sort -c -u | ||