Commit 4f53a500 authored by Holger Levsen's avatar Holger Levsen

chroot-installation: cleanup old directories

Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent 9da100bc
......@@ -118,6 +118,22 @@ if [ -d /srv/workspace/pbuilder/ ] ; then
fi
fi
#
# delete old chroot-installation directories (not related to reproducible builds)
#
if [ -d /srv/workspace/chroots/ ] ; then
echo "$(date -u) - Deleting chroots build directories, older than 7 days."
OLDSTUFF=$(find /srv/workspace/chroots/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +6 -exec ls -lad {} \; || true)
if [ ! -z "$OLDSTUFF" ] ; then
echo
echo "Old chroot-installation directories found in /srv/workspace/chroots/"
echo -n "$OLDSTUFF"
( find /srv/workspace/chroots/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +6 -exec sudo rm -rf --one-file-system {} \; ) || true
echo
DIRTY=true
fi
fi
#
# check for working proxy
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment