tests: simplify sbin check.
This commit is contained in:
parent
e7f25571d0
commit
0e4cc45a5b
1 changed files with 3 additions and 5 deletions
|
|
@ -353,11 +353,9 @@ check_sbin() {
|
|||
for file in "${files[@]}"; do
|
||||
(
|
||||
while read -r match; do
|
||||
if [[ $match =~ (@\{sbin\}/($pattern)) ]]; then
|
||||
name="${BASH_REMATCH[2]}"
|
||||
if ! _in_array "$name" "${sbin[@]}"; then
|
||||
_err compatibility "$file" "contains '@{sbin}/$name' but it is not in sbin.list"
|
||||
fi
|
||||
name="${match/\@\{sbin\}\//}"
|
||||
if ! _in_array "$name" "${sbin[@]}"; then
|
||||
_err compatibility "$file" "contains '@{sbin}/$name' but it is not in sbin.list"
|
||||
fi
|
||||
done < <(grep --only-matching -E "@\{sbin\}/$pattern" "${file%%:*}")
|
||||
) &
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue