diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-10-05 11:36:47 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-10-05 11:36:47 +0200 |
commit | 96ce46531ca88c067363556cd84347a813e1dc37 (patch) | |
tree | fa2d61c4a70389561036b615eedb25bdb89bc5f8 /bin | |
parent | 8ff91c80546e7590428811ce470f09e5d6a2c4b9 (diff) | |
download | jenkins.debian.net-96ce46531ca88c067363556cd84347a813e1dc37.tar.xz |
reproducible: dont fail on vanishing cruft
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_maintenance.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/reproducible_maintenance.sh b/bin/reproducible_maintenance.sh index fbc8eaa7..a8ef120d 100755 --- a/bin/reproducible_maintenance.sh +++ b/bin/reproducible_maintenance.sh @@ -102,11 +102,11 @@ set -e # delete old temp directories echo "$(date -u) - Deleting old temp directories." -OLDSTUFF=$(find $REP_RESULTS -maxdepth 1 -type d -name "tmp.*" -mtime +2 -exec ls -lad {} \;) +OLDSTUFF=$(find $REP_RESULTS -maxdepth 1 -type d -name "tmp.*" -mtime +2 -exec ls -lad {} \; || true) if [ ! -z "$OLDSTUFF" ] ; then echo echo "Old temp directories found in $REP_RESULTS" - find $REP_RESULTS -maxdepth 1 -type d -name "tmp.*" -mtime +2 -exec rm -rv {} \; + find $REP_RESULTS -maxdepth 1 -type d -name "tmp.*" -mtime +2 -exec rm -rv {} \; || true echo "These old directories have been deleted." echo DIRTY=true @@ -123,13 +123,13 @@ ps fax|grep -v grep |grep "schroot --directory" || for i in $(schroot --all-sess # find old schroots echo "$(date -u) - Removing old schroots." -OLDSTUFF=$(find /schroots/ -maxdepth 1 -type d -regextype posix-extended -regex "/schroots/reproducible-.*-[0-9]{1,5}" -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 {} \; || true) if [ ! -z "$OLDSTUFF" ] ; then echo echo "Old schroots found in /schroots, which will be deleted:" - 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 {} \; + 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 {} \; || true echo "$OLDSTUFF" - OLDSTUFF=$(find /schroots/ -maxdepth 1 -type d -regextype posix-extended -regex "/schroots/reproducible-.*-[0-9]{1,5}" -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 {} \; || true) if [ ! -z "$OLDSTUFF" ] ; then echo echo "Warning: Tried, but failed to delete these:" |