tests: simplify sbin check.

This commit is contained in:
Alexandre Pujol 2025-06-19 20:03:53 +02:00
parent e7f25571d0
commit 0e4cc45a5b
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC

View file

@ -353,12 +353,10 @@ check_sbin() {
for file in "${files[@]}"; do for file in "${files[@]}"; do
( (
while read -r match; do while read -r match; do
if [[ $match =~ (@\{sbin\}/($pattern)) ]]; then name="${match/\@\{sbin\}\//}"
name="${BASH_REMATCH[2]}"
if ! _in_array "$name" "${sbin[@]}"; then if ! _in_array "$name" "${sbin[@]}"; then
_err compatibility "$file" "contains '@{sbin}/$name' but it is not in sbin.list" _err compatibility "$file" "contains '@{sbin}/$name' but it is not in sbin.list"
fi fi
fi
done < <(grep --only-matching -E "@\{sbin\}/$pattern" "${file%%:*}") done < <(grep --only-matching -E "@\{sbin\}/$pattern" "${file%%:*}")
) & ) &
_wait jobs _wait jobs