summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-17 15:07:11 +0200
committerHolger Levsen <holger@layer-acht.org>2015-10-17 15:07:11 +0200
commitd376e3991b6b8b087ab6580aec1cd7e2e08a9be1 (patch)
tree4fe550cf86e6f3aeef28d96805f08071609b3703 /bin
parenta908a7d4ab6aebc571880bb5190c992b977c5812 (diff)
downloadjenkins.debian.net-d376e3991b6b8b087ab6580aec1cd7e2e08a9be1.tar.xz
reproducible: cleanup old pbuilder build directories
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_maintenance.sh12
1 files changed, 12 insertions, 0 deletions
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