From e97a439c34f641fb0c1a64ddd51999dae3db7437 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 4 Nov 2014 18:58:34 +0100 Subject: chroot-run: correctly handle variable types (fix artifact publishing) --- bin/chroot-run.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/chroot-run.sh b/bin/chroot-run.sh index c79a8b59..e771cf86 100755 --- a/bin/chroot-run.sh +++ b/bin/chroot-run.sh @@ -8,6 +8,11 @@ DEBUG=false . /srv/jenkins/bin/common-functions.sh common_init "$@" +# cp artifacts back into workspace if this is set +if [ "$ARTIFACTS" != "true" ] ; then + ARTIFACTS=false +fi + # $1 = base distro # $2 $3 ... = command to run inside a clean chroot running the distro in $1 @@ -90,7 +95,7 @@ cleanup() { # # publish artifacts # - if $ARTIFACTS ; then + if [ "$ARTIFACTS" = "true" ] ; then CHANGES=$(ls -1 $CHROOT_TARGET/tmp/*_*.changes 2>/dev/null|| true) dcmd cp $CHANGES $WORKSPACE/ fi -- cgit v1.2.3-70-g09d2