[Qa-jenkins-scm] [jenkins.debian.net] 03/05: reproducible: maintenance: fix find call to be more clever about what to delete (avoid deleting debbindiff schroot)

Holger Levsen holger at moszumanska.debian.org
Thu Apr 30 20:02:08 UTC 2015


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

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

commit 374bce8b07b84baf858463ee21e1569dde15734b
Author: Mattia Rizzolo <mattia at mapreri.org>
Date:   Thu Apr 30 19:31:58 2015 +0200

    reproducible: maintenance: fix find call to be more clever about what to delete (avoid deleting debbindiff schroot)
---
 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 098e63d..2f7fed8 100755
--- a/bin/reproducible_maintenance.sh
+++ b/bin/reproducible_maintenance.sh
@@ -48,11 +48,11 @@ if [ ! -z "$OLDSTUFF" ] ; then
 fi
 
 # find old schroots
-OLDSTUFF=$(find /schroots/ -maxdepth 1 -type d -name "reproducible-*-*" -mtime +2 -exec ls -lad {} \;)
+OLDSTUFF=$(find /schroots/ -maxdepth 1 -type d -regextype posix-extended -regex "/schroots/reproducible-.*-[0-9]{1,5}" -mtime +2 -exec ls -lad {} \;)
 if [ ! -z "$OLDSTUFF" ] ; then
 	echo
 	echo "Warning: old schroots found in /schroots, which have been deleted:"
-	find /schroots/ -maxdepth 1 -type d -name "reproducible-*-*" -mtime +2 -exec sudo rm -rf --one-file-system {} \;
+	find /schroots/ -maxdepth 1 -type d -regextype posix-extended -regex "/schroots/reproducible-.*-[0-9]{1,5}" -mtime +2 -exec sudo rm -rf --one-file-system {} \;
 	echo "$OLDSTUFF"
 	echo
 	DIRTY=true

-- 
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