[projects/cleanbuild] Improve build dir test with multiple matches

glen glen at pld-linux.org
Fri Jul 19 17:46:10 CEST 2024


commit c38ed1b7f5ec9d6a9ebf8419119805bdef5a820e
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Wed Mar 8 00:36:41 2023 +0200

    Improve build dir test with multiple matches

 bin/cleanbuild-docker.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/bin/cleanbuild-docker.sh b/bin/cleanbuild-docker.sh
index dd78b9d..c051609 100755
--- a/bin/cleanbuild-docker.sh
+++ b/bin/cleanbuild-docker.sh
@@ -185,9 +185,9 @@ package_build() {
 		fi
 
 		findbr=$PACKAGE_NAME.findbr.log
-		builddir=$(docker exec -w $home $name sh -c 'test ! -d rpm/BUILD/* || echo rpm/BUILD/*')
+		builddir=$(docker exec -w $home $name sh -ec 'set -- rpm/BUILD/*; echo "$1"')
 		if [ -z "$builddir" ]; then
-			die "No build dir. Build failed?" 6
+			die "Unable to determine build dir. Build failed?" 6
 		fi
 		notice "Execute findbr"
 		docker exec --user=root -w / $name sh -c "cd $home && cleanbuild/bin/findbr $builddir $buildlog" > $findbr
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/cleanbuild.git/commitdiff/c38ed1b7f5ec9d6a9ebf8419119805bdef5a820e



More information about the pld-cvs-commit mailing list