[projects/cleanbuild] Use common die()
glen
glen at pld-linux.org
Thu Apr 1 13:33:18 CEST 2021
commit 20a616bf5c1d2aefd468096219a46dee82f59317
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Thu Mar 11 00:49:52 2021 +0200
Use common die()
bin/cleanbuild-docker.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/bin/cleanbuild-docker.sh b/bin/cleanbuild-docker.sh
index d0f9747..fffd8f9 100755
--- a/bin/cleanbuild-docker.sh
+++ b/bin/cleanbuild-docker.sh
@@ -18,8 +18,9 @@ topdir=$dir/rpm
home=/home/builder
die() {
- echo >&2 "$0: $*"
- exit 1
+ local rc=${2:-1}
+ echo >&2 "$0: $1"
+ exit $rc
}
is_no() {
@@ -106,8 +107,7 @@ package_build() {
findbr=$PACKAGE_NAME.findbr.log
builddir=$(docker exec $name sh -c 'test ! -d rpm/BUILD/* || echo rpm/BUILD/*')
if [ -z "$builddir" ]; then
- echo >&2 "No build dir. Build failed?"
- exit 6
+ die "No build dir. Build failed?" 6
fi
# need root to run poldek
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/970162d0a0e6f66049427fd3754e1cac7e2e56ad
More information about the pld-cvs-commit
mailing list