]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
make.sh: Show rootfiles that contain some architecture
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Oct 2024 09:34:45 +0000 (09:34 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Oct 2024 09:38:25 +0000 (09:38 +0000)
Previously, make.sh just failed but did not explain why it was unhappy.

This patch adds a message which rootfiles contain which architecture.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index c85d9dbb66f62fdca07045f914d56e30b054f871..7129c36e7e29aac58e25e46b81891daedee6eb88 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -2197,12 +2197,18 @@ check_rootfiles_for_arch() {
                args+=( "--exclude" "${x}" )
        done
 
-       # Search for all lines that contain the architecture, but exclude commented lines
-       if grep -r "^[^#].*${arch}" "${args[@]}"; then
-               return 1
-       fi
+       # Search for all files that contain the architecture, but exclude commented lines
+       local files=(
+               $(grep --files-with-matches -r "^[^#].*${arch}" "${args[@]}")
+       )
 
-       return 0
+       local file
+       for file in ${files[@]}; do
+               print_line "${file} contains ${arch}"
+               print_status FAIL
+       done
+
+       return "${#files[@]}"
 }
 
 check_rootfiles_for_pattern() {