diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_build_arch_pkg.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/reproducible_build_arch_pkg.sh b/bin/reproducible_build_arch_pkg.sh index 99aafb62..beff2d66 100755 --- a/bin/reproducible_build_arch_pkg.sh +++ b/bin/reproducible_build_arch_pkg.sh @@ -14,9 +14,11 @@ set -e cleanup_all() { cd - # delete main work dir - rm $TMPDIR -r - echo "$(date -u) - $TMPDIR deleted." + # delete main work dir (only on master) + if [ "$MODE" = "master" ] ; then + rm $TMPDIR -r + echo "$(date -u) - $TMPDIR deleted." + fi # delete makekpg build dir if [ ! -z $SRCPACKAGE ] && [ -d /tmp/$SRCPACKAGE-$(basename $TMPDIR) ] ; then rm -r /tmp/$SRCPACKAGE-$(basename $TMPDIR) @@ -87,6 +89,7 @@ remote_build() { ssh -p $PORT $NODE /srv/jenkins/bin/reproducible_build_arch_pkg.sh $BUILDNR ${SRCPACKAGE} ${TMPDIR} RESULT=$? if [ $RESULT -ne 0 ] ; then + ssh -p $PORT $NODE "rm -r $TMPDIR" || true handle_remote_error "with exit code $RESULT from $NODE for build #$BUILDNR for ${SRCPACKAGE}" fi rsync -e "ssh -p $PORT" -r $NODE:$TMPDIR/b$BUILDNR $TMPDIR/ |