From 6fb56b762b28219e7bd96bbf3841e127f0545204 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 17 Feb 2015 10:04:03 +0100 Subject: reproducible: limit find to maxdepth 1, improve output --- bin/reproducible_maintainance.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_maintainance.sh b/bin/reproducible_maintainance.sh index 6f2ae0fb..f5dea7d8 100755 --- a/bin/reproducible_maintainance.sh +++ b/bin/reproducible_maintainance.sh @@ -37,11 +37,11 @@ fi cp -v $PACKAGES_DB /var/lib/jenkins/userContent/ # delete old temp directories -OLDSTUFF=$(find $REP_RESULTS -type d -name "tmp.*" -mtime +2 -exec ls -lad {} \;) +OLDSTUFF=$(find $REP_RESULTS -maxdepth 1 -type d -name "tmp.*" -mtime +2 -exec ls -lad {} \;) if [ ! -z "$OLDSTUFF" ] ; then echo echo "Warning: old temp directories found in $REP_RESULTS" - find $REP_RESULTS -type d -name "tmp.*" -mtime +2 -exec rm -rv {} \; + find $REP_RESULTS -maxdepth 1 -type d -name "tmp.*" -mtime +2 -exec rm -rv {} \; echo "These old directories have been deleted." echo DIRTY=true @@ -51,7 +51,9 @@ fi OLDSTUFF=$(find /schroots/ -maxdepth 1 -type d -name "reproducible*" -mtime +2 -exec ls -lad {} \;) if [ ! -z "$OLDSTUFF" ] ; then echo - echo "Warning: old schroots found in $REP_RESULTS" + echo "Warning: old schroots found in /schroots" + echo $OLDSTUFF + echo "TODO: automatically delete them, please cleanup manually for now..." echo DIRTY=true fi @@ -83,7 +85,6 @@ if [ ! -z "$FAILED_BUILDS" ] ; then DIRTY=true fi - # find processes which should not be there HAYSTACK=$(mktemp) RESULT=$(mktemp) -- cgit v1.2.3-70-g09d2