From e5b35d14b8f81d1ecf1d6eb77aa20c7b7ca303e9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 18 Jun 2014 14:22:32 -0400 Subject: db-cleanup: delete symlinks in one pass --- db-cleanup | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/db-cleanup b/db-cleanup index 989bda1..efe7397 100755 --- a/db-cleanup +++ b/db-cleanup @@ -64,7 +64,6 @@ for POOL in "${PKGPOOLS[@]}" "${SRCPOOLS[@]}"; do done msg "Removing dead symlinks:" -find -L "${FTP_BASE}/" -type l -"${CLEANUP_DRYRUN}" || find -L "${FTP_BASE}/" -type l -delete - -exit $? +actions=(-print) +"${CLEANUP_DRYRUN}" || actions+=(-delete) +find -L "${FTP_BASE}/" -type l "${actions[@]}" -- cgit v1.2.3