bin/misc-functions.sh: use pipe for find ${D}${D}
authorZac Medico <zmedico@gentoo.org>
Tue, 30 Apr 2013 05:06:40 +0000 (22:06 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 30 Apr 2013 05:06:40 +0000 (22:06 -0700)
bin/misc-functions.sh

index 17dea4e98f8d835a71478c9a3882b34c7873093c..725ba55dcead98dfe5546e8a0cc69073d7fd38d3 100755 (executable)
@@ -537,13 +537,12 @@ install_qa_check() {
        fi
 
        if [[ -d ${D%/}${D} ]] ; then
-               declare -i INSTALLTOD=0
-               for i in $(find "${D%/}${D}"); do
+               local -i INSTALLTOD=0
+               while read -r -d $'\0' i ; do
                        eqawarn "QA Notice: /${i##${D%/}${D}} installed in \${D}/\${D}"
                        ((INSTALLTOD++))
-               done
+               done < <(find "${D%/}${D}" -print0)
                die "Aborting due to QA concerns: ${INSTALLTOD} files installed in ${D%/}${D}"
-               unset INSTALLTOD
        fi
 
        # Sanity check syntax errors in init.d scripts