From d05e0aa0fee7aa62cf5f2338a7bb507f51b52fba Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 30 Dec 2016 18:47:42 +0100 Subject: [PATCH] Less verbose by default --- id-deb-build/docker-build.sh | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/id-deb-build/docker-build.sh b/id-deb-build/docker-build.sh index ce331a6..780bcfc 100755 --- a/id-deb-build/docker-build.sh +++ b/id-deb-build/docker-build.sh @@ -6,11 +6,11 @@ Usage: docker-build.sh [OPTIONS] Options: [--debian=distros] [--ubuntu=distros] + [--verbose] [--upload] EOF exit $1 } -set -x D0=`dirname $0` ID_DEB_BUILD=`cd $D0; pwd` @@ -32,12 +32,12 @@ while test $# -gt 0; do --centos=*) CENTOS_DIST_A=$optarg ;; - --concurrency=*) - concurrency=$optarg - ;; --upload) upload=true ;; + --verbose) + set -x + ;; -*) do_help=yes ;; @@ -204,6 +204,7 @@ fi if test "${CENTOS_DIST}"; then for dist in ${CENTOS_DIST}; do + echo -n "$dist " case $dist in centos6) D=6;; @@ -214,21 +215,38 @@ if test "${CENTOS_DIST}"; then exit 1 esac cd build/centos/$dist - docker run -it --rm -v "$PWD:/build" -w /build/rpmbuild centos:$D ../in-docker-rpm.sh centos $D + docker run --rm -v "$PWD:/build" -w /build/rpmbuild centos:$D ../in-docker-rpm.sh centos $D >log 2>&1 + if test $? -eq 0; then + echo Done + else + echo "Fail. Inspect build/centos/$dist/log" + fi cd ../../.. done fi if test "${DEBIAN_DIST}"; then for dist in ${DEBIAN_DIST}; do + echo -n "Debian $dist " cd build/debian/$dist - docker run -it --rm -v "$PWD:/build" -w /build/$PRODUCT-$VERSION debian:$dist ../in-docker.sh debian $dist + docker run --rm -v "$PWD:/build" -w /build/$PRODUCT-$VERSION debian:$dist ../in-docker.sh debian $dist >log 2>&1 + if test $? -eq 0; then + echo Done + else + echo "Fail. Inspect build/debian/$dist/log" + fi cd ../../.. done fi if test "${UBUNTU_DIST}"; then for dist in ${UBUNTU_DIST}; do + echo -n "Ubuntu $dist" cd build/ubuntu/$dist - docker run -it --rm -v "$PWD:/build" -w /build/$PRODUCT-$VERSION ubuntu:$dist ../in-docker.sh ubuntu $dist + docker run --rm -v "$PWD:/build" -w /build/$PRODUCT-$VERSION ubuntu:$dist ../in-docker.sh ubuntu $dist >log 2>&1 + if test $? -eq 0; then + echo Done + else + echo "Fail. Inspect build/ubuntu/$dist/log" + fi cd ../../.. done fi -- 1.7.10.4