diff options
author | Mattia Rizzolo <mattia@mapreri.org> | 2015-04-30 19:31:58 +0200 |
---|---|---|
committer | Mattia Rizzolo <mattia@mapreri.org> | 2015-04-30 21:53:59 +0200 |
commit | 374bce8b07b84baf858463ee21e1569dde15734b (patch) | |
tree | ea5643bd5546eb0087b49d27d5175e14dfc141d8 /bin | |
parent | effc564e0c219cc167295c0c0ea623f3fd5ed92b (diff) | |
download | jenkins.debian.net-374bce8b07b84baf858463ee21e1569dde15734b.tar.xz |
reproducible: maintenance: fix find call to be more clever about what to delete (avoid deleting debbindiff schroot)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_maintenance.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index 098e63db..2f7fed83 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 |