summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_openwrt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/reproducible_openwrt.sh')
-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
}