avoid `ls` when a shell glob works (to avoid possible `ls` issues)
authorMike Frysinger <vapier@gentoo.org>
Sat, 10 Dec 2011 19:22:38 +0000 (19:22 +0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 10 Dec 2011 19:22:38 +0000 (19:22 +0000)
eclass/gst-plugins10.eclass
eclass/myspell.eclass

index 311e29c234b57aac1a600746c714e48cf805ea46..87bd85bc519097d41d74ae9114f89ec2e3cbbbf4 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins10.eclass,v 1.4 2011/04/12 05:55:30 leio Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gst-plugins10.eclass,v 1.5 2011/12/10 19:22:38 vapier Exp $
 
 # Author : foser <foser@gentoo.org>
 
@@ -70,9 +70,10 @@ gst-plugins10_remove_unversioned_binaries() {
        # remove the unversioned binaries gstreamer provide
        # this is to prevent these binaries to be owned by several SLOTs
 
-       cd ${D}/usr/bin
-       for gst_bins in `ls *-${PV_MAJ_MIN}`
-       do
+       cd "${D}"/usr/bin
+       local gst_bins
+       for gst_bins in *-${PV_MAJ_MIN}; do
+               [[ -e ${gst_bins} ]] || continue
                rm ${gst_bins/-${PV_MAJ_MIN}/}
                einfo "Removed ${gst_bins/-${PV_MAJ_MIN}/}"
        done
index 09463a0f430febfcfed273a3c1715e02d5bd6a20..680609dc2eba7db26de5ad3e5ac35ff0cf1e11ef 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/myspell.eclass,v 1.6 2009/02/09 08:21:00 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/myspell.eclass,v 1.7 2011/12/10 19:22:38 vapier Exp $
 
 # Author: Kevin F. Quinn <kevquinn@gentoo.org>
 # Packages: app-dicts/myspell-*
@@ -146,8 +146,8 @@ myspell_src_install() {
        done
        doins ${dictlst} || die "Failed to install ${dictlst}"
        # Install any txt files (usually README.txt) as documentation
-       for filen in $(ls *.txt 2> /dev/null); do
-               dodoc ${filen}
+       for filen in *.txt; do
+               [[ -s ${filen} ]] && dodoc ${filen}
        done
 }