font.eclass: Move while to primary shell
authorAndreas Sturmlechner <asturm@gentoo.org>
Mon, 7 Oct 2019 06:28:04 +0000 (08:28 +0200)
committerAndreas Sturmlechner <asturm@gentoo.org>
Wed, 16 Oct 2019 08:44:26 +0000 (10:44 +0200)
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
eclass/font.eclass

index f77f62291df825c30bacd82a6e608f9f54de7b76..701621002845685262e51b8e52f5d74705d547b6 100644 (file)
@@ -106,7 +106,7 @@ font_cleanup_dirs() {
        local d f g generated candidate otherfile
 
        ebegin "Cleaning up font directories"
-       find -L "${EROOT%/}"/usr/share/fonts/ -type d -print0 | while read -d $'\0' d; do
+       while read -d $'\0' -r; do
                candidate=false
                otherfile=false
                for f in "${d}"/*; do
@@ -141,7 +141,7 @@ font_cleanup_dirs() {
                        # if there's nothing left remove the directory
                        find "${d}" -maxdepth 0 -type d -empty -delete || eerror "failed to purge ${d}"
                fi
-       done
+       done < <(find -L "${EROOT%/}"/usr/share/fonts/ -type d -print0)
        eend 0
 }