| |
@@ -3,10 +3,17 @@
|
| |
# remove old stuff under kojiroot/work
|
| |
|
| |
TOPDIR=/mnt/koji
|
| |
- TIMEARG="-mtime +2"
|
| |
+ TIMEARG="-mtime +7"
|
| |
+ # final removal date should be in line with koji-prune-scratch
|
| |
+ TIMEARG_FINAL="-mtime +21"
|
| |
|
| |
- # for tasks, try to remove as a unit
|
| |
+ # for tasks, remove old stuff which is not symlink in shorter time
|
| |
for x in $(find "$TOPDIR"/work/tasks/ -mindepth 2 -maxdepth 2 -type d $TIMEARG); do
|
| |
+ find "$x" -xdev '!' -type d '!' -type l -print0 | xargs -0 -r rm -f
|
| |
+ done
|
| |
+
|
| |
+ # for tasks, try to remove as a unit on final date
|
| |
+ for x in $(find "$TOPDIR"/work/tasks/ -mindepth 2 -maxdepth 2 -type d $TIMEARG_FINAL); do
|
| |
find "$x" -xdev '!' -type d -print0 | xargs -0 -r rm -f
|
| |
find "$x" -xdev -depth -type d -print0 | xargs -0 -r rmdir
|
| |
done
|
| |