diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-10-21 19:52:32 -0500 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-10-21 19:52:32 -0500 |
commit | b0eed42c569582facfb3078dfa04669155fef84a (patch) | |
tree | 0f9b09e8104d8cd4b78f07e4d3c1d38907cf4612 /bin | |
parent | eca0014e7d79dea957b68dfae4e6f472d27bf632 (diff) | |
download | jenkins.debian.net-b0eed42c569582facfb3078dfa04669155fef84a.tar.xz |
reproducible openwrt: add very simple safeguards against cleanup going wrong
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_openwrt.sh | 6 |
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 } |