From d1bb373a0ae05c5a5c31e46fd55d81795faaf7ce Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 25 Oct 2014 10:20:01 +0200 Subject: introduce common DEBUG variable --- bin/chroot-installation.sh | 1 + bin/chroot-run.sh | 1 + bin/common-functions.sh | 12 ++++++++---- bin/d-i_build.sh | 1 + bin/d-i_check_jobs.sh | 1 + bin/d-i_manual.sh | 1 + bin/d-i_parse_logs.sh | 1 + bin/g-i-installation.sh | 1 + bin/housekeeping.sh | 1 + bin/reproducible_common.sh | 1 + bin/schroot-create.sh | 1 + bin/webcheck_url.sh | 1 + 12 files changed, 19 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/chroot-installation.sh b/bin/chroot-installation.sh index 8b76f85f..cda141b1 100755 --- a/bin/chroot-installation.sh +++ b/bin/chroot-installation.sh @@ -3,6 +3,7 @@ # Copyright 2012-2014 Holger Levsen # released under the GPLv=2 +DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" diff --git a/bin/chroot-run.sh b/bin/chroot-run.sh index 18f14a2a..afec3721 100755 --- a/bin/chroot-run.sh +++ b/bin/chroot-run.sh @@ -4,6 +4,7 @@ # Copyright 2013 Antonio Terceiro # released under the GPLv=2 +DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" diff --git a/bin/common-functions.sh b/bin/common-functions.sh index 583d5b5c..c68d4170 100755 --- a/bin/common-functions.sh +++ b/bin/common-functions.sh @@ -52,16 +52,20 @@ else fi # use these settings in the scripts in the (s)chroots too export SCRIPT_HEADER="#!/bin/bash + if $DEBUG ; then + set -x + fi set -e - set -x export DEBIAN_FRONTEND=noninteractive export LC_ALL=$LC_ALL export http_proxy=$http_proxy export MIRROR=$MIRROR" - # be more verbose - export + # be more verbose, maybe + if $DEBUG ; then + export + set -x + fi set -e - set -x fi } diff --git a/bin/d-i_build.sh b/bin/d-i_build.sh index d0905860..879da51d 100755 --- a/bin/d-i_build.sh +++ b/bin/d-i_build.sh @@ -3,6 +3,7 @@ # Copyright 2012-2014 Holger Levsen # released under the GPLv=2 +DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" diff --git a/bin/d-i_check_jobs.sh b/bin/d-i_check_jobs.sh index dad4f95b..e76a6178 100755 --- a/bin/d-i_check_jobs.sh +++ b/bin/d-i_check_jobs.sh @@ -3,6 +3,7 @@ # Copyright 2012,2014 Holger Levsen # released under the GPLv=2 +DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" diff --git a/bin/d-i_manual.sh b/bin/d-i_manual.sh index ab1c895c..fa014e50 100755 --- a/bin/d-i_manual.sh +++ b/bin/d-i_manual.sh @@ -3,6 +3,7 @@ # Copyright 2012,2014 Holger Levsen # released under the GPLv=2 +DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" diff --git a/bin/d-i_parse_logs.sh b/bin/d-i_parse_logs.sh index a3eaa3de..074c7f39 100755 --- a/bin/d-i_parse_logs.sh +++ b/bin/d-i_parse_logs.sh @@ -3,6 +3,7 @@ # Copyright 2012-2014 Holger Levsen # released under the GPLv=2 +DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" diff --git a/bin/g-i-installation.sh b/bin/g-i-installation.sh index d2da7187..9528d6f6 100755 --- a/bin/g-i-installation.sh +++ b/bin/g-i-installation.sh @@ -3,6 +3,7 @@ # Copyright 2012-2014 Holger Levsen # released under the GPLv=2 +DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" diff --git a/bin/housekeeping.sh b/bin/housekeeping.sh index 69bb63c7..d123ebcf 100755 --- a/bin/housekeeping.sh +++ b/bin/housekeeping.sh @@ -3,6 +3,7 @@ # Copyright 2012-2014 Holger Levsen # released under the GPLv=2 +DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index fafcc08d..a6ffa53d 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -3,6 +3,7 @@ # Copyright 2014 Holger Levsen # released under the GPLv=2 +DEBUG=false # # included by all reproducible_*.sh scripts # diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh index 5f31e3cd..02540411 100755 --- a/bin/schroot-create.sh +++ b/bin/schroot-create.sh @@ -5,6 +5,7 @@ # Copyright 2014 Joachim Breitner # released under the GPLv=2 +DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" diff --git a/bin/webcheck_url.sh b/bin/webcheck_url.sh index b4b523e7..af23d474 100755 --- a/bin/webcheck_url.sh +++ b/bin/webcheck_url.sh @@ -3,6 +3,7 @@ # Copyright 2012,2014 Holger Levsen # released under the GPLv=2 +DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" -- cgit v1.2.3-54-g00ecf