From d434ffed8052f22017db2310eef9ef9b27ba7ad9 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: May 27 2016 19:22:02 +0000 Subject: we can not use -delete as we have to limit the depth so we do not remove files from the current composes the rm -rf is needed to clean up the directories -delete gives us find: cannot delete '/mnt/koji/compose/rawhide/Fedora-Rawhide-20160512.n.0/compose': Directory not empty find: cannot delete '/mnt/koji/compose/rawhide/Fedora-Rawhide-20160512.n.0/logs': Directory not empty Revert "Use -delete instead of -exec rm it's quicker because it doesn't fork for every file" This reverts commit e45177a4c6a0dc6278dce858095422c67b9fb699. Signed-off-by: Dennis Gilmore --- diff --git a/nightly.sh b/nightly.sh index 8b3e9e7..5b974db 100755 --- a/nightly.sh +++ b/nightly.sh @@ -135,5 +135,5 @@ do ./releng/scripts/srpm-excluded-arch.py -a $arches --path $DESTDIR/compose/Everything/source/tree/Packages/\*/ >$DESTDIR/logs/excludearch-$koji.log done -find $TARGET_DIR -xdev -depth -maxdepth 2 -mtime +14 -delete +find $TARGET_DIR -xdev -depth -maxdepth 2 -mtime +14 -exec rm -rf {} \;