diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-02-17 10:04:03 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-02-17 10:04:03 +0100 |
commit | 6fb56b762b28219e7bd96bbf3841e127f0545204 (patch) | |
tree | 42a8236f74fc8d2058bea21edb56bc1b72714812 /bin/reproducible_maintainance.sh | |
parent | 78b1a05147550c784a8083de3a75ea99206dde06 (diff) | |
download | jenkins.debian.net-6fb56b762b28219e7bd96bbf3841e127f0545204.tar.xz |
reproducible: limit find to maxdepth 1, improve output
Diffstat (limited to 'bin/reproducible_maintainance.sh')
-rwxr-xr-x | bin/reproducible_maintainance.sh | 9 |
1 files changed, 5 insertions, 4 deletions
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) |