From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 29CDA59CA5 for ; Sun, 20 Mar 2016 23:53:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7270621C01D; Sun, 20 Mar 2016 23:53:28 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A21E821C014 for ; Sun, 20 Mar 2016 23:53:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 78814340A5C for ; Sun, 20 Mar 2016 23:53:26 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B5BCA85B for ; Sun, 20 Mar 2016 23:53:23 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1458510908.867545ebd8fb51535dd2a715aac033830d29f112.vapier@gentoo> Subject: [gentoo-commits] proj/releng:master commit in: scripts/ X-VCS-Repository: proj/releng X-VCS-Files: scripts/copy_buildsync.sh X-VCS-Directories: scripts/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 867545ebd8fb51535dd2a715aac033830d29f112 X-VCS-Branch: master Date: Sun, 20 Mar 2016 23:53:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d91ad1af-7ca7-41a9-8314-1eb1b9483a1d X-Archives-Hash: ae8f41bfa4ebd6d0aefcb0ce29a4b687 commit: 867545ebd8fb51535dd2a715aac033830d29f112 Author: Mike Frysinger gentoo org> AuthorDate: Sun Mar 20 21:55:08 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Sun Mar 20 21:55:08 2016 +0000 URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=867545eb copy_buildsync.sh: simplify find clean up Use find options to process everything rather than running through grep/sort/tr/xargs. scripts/copy_buildsync.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/copy_buildsync.sh b/scripts/copy_buildsync.sh index 927a1fd..b4351cb 100755 --- a/scripts/copy_buildsync.sh +++ b/scripts/copy_buildsync.sh @@ -74,11 +74,9 @@ copy_arch_to_outgoing() { fail=1 fi done - find ${outdir} -mindepth 1 -type d \ - | egrep -v current \ - | sort -r \ - | tr '\n' '\0' \ - | xargs -0 --no-run-if-empty rmdir --ignore-fail-on-non-empty + find "${outdir}" \ + -depth -mindepth 1 -type d \ + -exec rmdir --ignore-fail-on-non-empty {} + } process_arch() {