[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible maintenance: ignore top dir in those find(1)

Mattia Rizzolo mattia at debian.org
Thu Apr 5 14:27:51 UTC 2018


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository jenkins.debian.net.

commit a2b7b46773d4fc2bf06f9f19267a1a51a9d6855b
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Thu Apr 5 16:27:45 2018 +0200

    reproducible maintenance: ignore top dir in those find(1)
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 bin/reproducible_maintenance.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh
index dfa0ffc..1d6cc53 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -205,7 +205,7 @@ fi
 # remove too old schroot sessions
 echo "$(date -u) - Removing schroot sessions older than 2 days."
 dir=/var/lib/schroot/unpack/
-OLDSTUFF=$(find "$dir" -maxdepth 1 -type d -mtime +2 -exec ls -lad {} \;)
+OLDSTUFF=$(find "$dir" -mindepth 1 -maxdepth 1 -type d -mtime +2 -exec ls -lad {} \;)
 if [ ! -z "$OLDSTUFF" ]; then
 	echo
 	echo "schroot sessions older than 2 days found, which will be deleted:"
@@ -215,7 +215,7 @@ if [ ! -z "$OLDSTUFF" ]; then
 		echo "$(date -u) - removing schroot session $s..."
 		schroot -c "$s" --end-session
 	done
-	OLDSTUFF=$(find "$dir" -maxdepth 1 -type d -mtime +2 -exec ls -lad {} \;)
+	OLDSTUFF=$(find "$dir" -mindepth 1 -maxdepth 1 -type d -mtime +2 -exec ls -lad {} \;)
 	if [ ! -z "$OLDSTUFF" ]; then
 		echo
 		echo "Warning: Tried, but failed to remove these:"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list