summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/reproducible_maintenance.sh56
1 files changed, 30 insertions, 26 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index d5f0c103..c5beb35a 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -58,6 +58,36 @@ fi
set -e
#
+# delete old temp directories
+#
+echo "$(date -u) - Deleting temp directories, older than 3 days."
+OLDSTUFF=$(find $REP_RESULTS/rbuild-debian -maxdepth 1 -type d -mtime +2 -name "tmp.*" -exec ls -lad {} \; || true)
+if [ ! -z "$OLDSTUFF" ] ; then
+ echo
+ echo "Old temp directories found in $REP_RESULTS/rbuild-debian"
+ find $REP_RESULTS/rbuild-debian -maxdepth 1 -type d -mtime +2 -name "tmp.*" -exec rm -rv {} \; || true
+ echo "These old directories have been deleted."
+ echo
+ DIRTY=true
+fi
+
+#
+# delete old pbuilder build directories
+#
+if [ -d /srv/workspace/pbuilder/ ] ; then
+ echo "$(date -u) - Deleting pbuilder build directories, older than 3 days."
+ OLDSTUFF=$(find /srv/workspace/pbuilder/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +2 -exec ls -lad {} \; || true)
+ if [ ! -z "$OLDSTUFF" ] ; then
+ echo
+ echo "Old pbuilder build directories found in /srv/workspace/pbuilder/"
+ echo -n "$OLDSTUFF"
+ find /srv/workspace/pbuilder/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +2 -exec sudo rm -rf --one-file-system {} \; || true
+ echo
+ DIRTY=true
+ fi
+fi
+
+#
# check for working proxy
#
echo "$(date -u) - testing whether the proxy works..."
@@ -139,32 +169,6 @@ if [ "$HOSTNAME" = "${ARCHLINUX_BUILD_NODE}" ] ; then
fi
set -e
-# delete old temp directories
-echo "$(date -u) - Deleting temp directories, older than 3 days."
-OLDSTUFF=$(find $REP_RESULTS/rbuild-debian -maxdepth 1 -type d -mtime +2 -name "tmp.*" -exec ls -lad {} \; || true)
-if [ ! -z "$OLDSTUFF" ] ; then
- echo
- echo "Old temp directories found in $REP_RESULTS/rbuild-debian"
- find $REP_RESULTS/rbuild-debian -maxdepth 1 -type d -mtime +2 -name "tmp.*" -exec rm -rv {} \; || true
- echo "These old directories have been deleted."
- echo
- DIRTY=true
-fi
-
-# delete old pbuilder build directories
-if [ -d /srv/workspace/pbuilder/ ] ; then
- echo "$(date -u) - Deleting pbuilder build directories, older than 3 days."
- OLDSTUFF=$(find /srv/workspace/pbuilder/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +2 -exec ls -lad {} \; || true)
- if [ ! -z "$OLDSTUFF" ] ; then
- echo
- echo "Old pbuilder build directories found in /srv/workspace/pbuilder/"
- echo -n "$OLDSTUFF"
- find /srv/workspace/pbuilder/ -maxdepth 2 -regex '.*/[0-9]+' -type d -mtime +2 -exec sudo rm -rf --one-file-system {} \; || true
- echo
- DIRTY=true
- fi
-fi
-
# delete build services logfiles
if [ "$HOSTNAME" = "$MAINNODE" ] ; then
if [ -d /var/lib/jenkins/userContent/reproducible/debian/build_service/ ] ; then