summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-05 11:36:47 +0200
committerHolger Levsen <holger@layer-acht.org>2015-10-05 11:36:47 +0200
commit96ce46531ca88c067363556cd84347a813e1dc37 (patch)
treefa2d61c4a70389561036b615eedb25bdb89bc5f8 /bin
parent8ff91c80546e7590428811ce470f09e5d6a2c4b9 (diff)
downloadjenkins.debian.net-96ce46531ca88c067363556cd84347a813e1dc37.tar.xz
reproducible: dont fail on vanishing cruft
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_maintenance.sh10
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:"