summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-17 16:08:24 +0200
committerHolger Levsen <holger@layer-acht.org>2015-10-17 16:08:24 +0200
commiteba6fdca01df71e21c70ced6a408a8750cc46168 (patch)
treefaeb464e4bcceae063560aaa3ce51c25c7dfc282 /bin
parent2e91b3dfc6ba4c83aa481c3308f570aaf0fada78 (diff)
downloadjenkins.debian.net-eba6fdca01df71e21c70ced6a408a8750cc46168.tar.xz
reproducible: cleanup pbuilder directories older than 3 days
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_maintenance.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index b3ce4181..a09d4ff1 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -102,7 +102,7 @@ done
set -e
# delete old temp directories
-echo "$(date -u) - Deleting old temp directories."
+echo "$(date -u) - Deleting temp directories, older than 2 days."
OLDSTUFF=$(find $REP_RESULTS -maxdepth 1 -type d -name "tmp.*" -mtime +2 -exec ls -lad {} \; || true)
if [ ! -z "$OLDSTUFF" ] ; then
echo
@@ -114,13 +114,12 @@ if [ ! -z "$OLDSTUFF" ] ; then
fi
# delete old pbuilder build directories
-echo "$(date -u) - Deleting old pbuilder build directories."
+echo "$(date -u) - Deleting pbuilder build directories, older than 3 days."
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."
+ find /srv/workspace/pbuilder/ -maxdepth 1 -regex '.*/[0-9]+' -type d -mtime +3 -exec rm -rv {} \; || true
echo
DIRTY=true
fi