commit:     ebe96286279fde6dfc989d03e5da834f0382d1a2
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 28 12:18:20 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Sep 17 18:17:18 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=ebe96286

estrip: Use find -delete instead of manual rm

Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>
Closes: https://github.com/gentoo/portage/pull/364

 bin/estrip | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bin/estrip b/bin/estrip
index 5709b862c..3ee4b01ac 100755
--- a/bin/estrip
+++ b/bin/estrip
@@ -363,10 +363,9 @@ done < <(
 )
 else
 while IFS= read -d '' -r x ; do
-       rm -f "${x}" || die
        inode_link=$(get_inode_number "${x%.estrip}") || die "stat failed 
unexpectedly"
        echo "${x%.estrip}" >> "${inode_link}" || die "echo failed unexpectedly"
-done < <(find "${ED}" -name '*.estrip' -print0)
+done < <(find "${ED}" -name '*.estrip' -delete -print0)
 fi
 
 # Now we look for unstripped binaries.

Reply via email to