From d376e3991b6b8b087ab6580aec1cd7e2e08a9be1 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 17 Oct 2015 15:07:11 +0200 Subject: reproducible: cleanup old pbuilder build directories --- bin/reproducible_maintenance.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bin') diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index 84e1b836..b3ce4181 100755 --- a/bin/reproducible_maintenance.sh +++ b/bin/reproducible_maintenance.sh @@ -113,6 +113,18 @@ if [ ! -z "$OLDSTUFF" ] ; then DIRTY=true fi +# delete old pbuilder build directories +echo "$(date -u) - Deleting old pbuilder build directories." +OLDSTUFF=$(find /srv/workspace/pbuilder/ -maxdepth 1 -regex '.*/[0-9]+' -type d -mtime +3 -exec ls -lad {} \; || true) +if [ ! -z "$OLDSTUFF" ] ; then + echo + echo "Old temp directories found in $REP_RESULTS" + echo find /srv/workspace/pbuilder/ -maxdepth 1 -regex '.*/[0-9]+' -type d -mtime +3 -exec rm -rv {} \; || true + echo "Warning: These old directories have not been deleted." + echo + DIRTY=true +fi + # remove old and unused schroot sessions echo "$(date -u) - Removing unused schroot sessions." cleanup_schroot_sessions -- cgit v1.2.3-70-g09d2