diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh index cf20f13e1bad5a57a1b6a931bf1dfd3e34879f44..51d2dc6539cdea8f7bd2e52b8d9bdad19858f0b1 100755 --- a/bin/reproducible_openwrt.sh +++ b/bin/reproducible_openwrt.sh @@ -42,7 +42,8 @@ node_debug() { # only called direct on a remote build node node_cleanup_tmpdirs() { - export TMPBUILDDIR=$1 + export RUN=$1 + export TMPBUILDDIR=$2 cd # (very simple) check we are deleting the right stuff if [ "${TMPBUILDDIR:0:23}" != "/srv/workspace/chroots/" ] || [ ${#TMPBUILDDIR} -le 23 ] ; then @@ -82,8 +83,8 @@ master_cleanup_tmpdirs() { rsync -av "$GENERIC_NODE2:$TMPBUILDDIR/build_logs.tar.xz" "$WORKSPACE/results/build_logs_b2.tar.xz" || true fi - $SSHN1 "reproducible_openwrt" node node_cleanup_tmpdirs "$TMPBUILDDIR" || true - $SSHN2 "reproducible_openwrt" node node_cleanup_tmpdirs "$TMPBUILDDIR" || true + $SSHN1 "reproducible_openwrt" node node_cleanup_tmpdirs "b1" "$TMPBUILDDIR" || true + $SSHN2 "reproducible_openwrt" node node_cleanup_tmpdirs "b2" "$TMPBUILDDIR" || true cd # (very simple) check we are deleting the right stuff @@ -473,7 +474,7 @@ build_two_times() { rsync -av "$GENERIC_NODE1:$TMPBUILDDIR/$RUN/" "$RESULTSDIR/$RUN/" rsync -av "$GENERIC_NODE1:$TMPBUILDDIR/build_logs.tar.xz" "$WORKSPACE/results/build_logs_b1.tar.xz" rsync -av "$GENERIC_NODE1:$TMPBUILDDIR/toolchain.html" "$RESULTSDIR/toolchain.html" - $SSHN1 "reproducible_openwrt" node node_cleanup_tmpdirs "$TMPBUILDDIR" + $SSHN1 "reproducible_openwrt" node node_cleanup_tmpdirs "$RUN" "$TMPBUILDDIR" ## second run local RUN=b2 @@ -482,7 +483,7 @@ build_two_times() { # rsync back logs and images rsync -av "$GENERIC_NODE2:$TMPBUILDDIR/$RUN/" "$RESULTSDIR/$RUN/" rsync -av "$GENERIC_NODE2:$TMPBUILDDIR/build_logs.tar.xz" "$WORKSPACE/results/build_logs_b2.tar.xz" - $SSHN2 "reproducible_openwrt" node node_cleanup_tmpdirs "$TMPBUILDDIR" + $SSHN2 "reproducible_openwrt" node node_cleanup_tmpdirs "$RUN" "$TMPBUILDDIR" }