summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-21 19:52:32 -0500
committerHolger Levsen <holger@layer-acht.org>2015-10-21 19:52:32 -0500
commitb0eed42c569582facfb3078dfa04669155fef84a (patch)
tree0f9b09e8104d8cd4b78f07e4d3c1d38907cf4612 /bin
parenteca0014e7d79dea957b68dfae4e6f472d27bf632 (diff)
downloadjenkins.debian.net-b0eed42c569582facfb3078dfa04669155fef84a.tar.xz
reproducible openwrt: add very simple safeguards against cleanup going wrong
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_openwrt.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index ee800f0a..469c1775 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -15,6 +15,12 @@ set -e
cleanup_tmpdirs() {
cd
+ # (very simple) check we are deleting the right stuff
+ if [ "${TMPDIR:0:26}" != "/srv/reproducible-results/" ] || [ ${#TMPDIR} -le 26 ] || \
+ [ "${TMPBUILDDIR:0:23}" != "/srv/workspace/chroots/" ] || [ ${#TMPBUILDDIR} -le 23 ] ; then
+ echo "Something very strange with \$TMPDIR=$TMPDIR or \$TMPBUILDDIR=$TMPBUILDDIR, exiting instead of doing cleanup."
+ exit 1
+ fi
rm -rf $TMPDIR
rm -rf $TMPBUILDDIR
}