From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q4t9D-0000Z2-71 for garchives@archives.gentoo.org; Wed, 30 Mar 2011 11:01:11 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2E3F81C0F7; Wed, 30 Mar 2011 11:01:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 60CBA1C07E for ; Wed, 30 Mar 2011 11:00:30 +0000 (UTC) Received: from [192.168.1.3] (pool-68-238-122-27.atl.dsl-w.verizon.net [68.238.122.27]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: titanofold) by smtp.gentoo.org (Postfix) with ESMTPSA id B6BC81B4082 for ; Wed, 30 Mar 2011 11:00:29 +0000 (UTC) Message-ID: <4D930D45.30107@gentoo.org> Date: Wed, 30 Mar 2011 07:00:21 -0400 From: "Aaron W. Swenson" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110310 Lightning/1.0b3pre Thunderbird/3.1.9 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: RFC: postgresql.eselect References: <4D914FC5.7040109@gentoo.org> <19857.41217.854435.807699@a1i15.kph.uni-mainz.de> <4D92497D.30100@gentoo.org> <20110329223548.17db0114@gentoo.org> <20110330075818.GH90632@gentoo.org> In-Reply-To: <20110330075818.GH90632@gentoo.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: X-Archives-Hash: fd42969e236b90c33a9a0bbc6e3484f3 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 03/30/2011 03:58 AM, Fabian Groffen wrote: > On 29-03-2011 22:35:48 -0600, Ryan Hill wrote: >>> Because 'ls' would complain that files didn't exist, such as lib*.dylib >>> when on a Linux system. It doesn't matter. But, using 'find' avoids this >>> mess. >> >> Never use ls to get filenames in a script. Instead of >> >> for link_source in $(eval ls ${source_dir} 2> /dev/null) ; do >> >> just use >> >> for link_source in "${source_dir}"/* ; do >> >> I see you already fixed this one, but you do some funky stuff with ls -d >> earlier on. > > Make sure though, when you use a glob, that you check for the asterisk. > > When there are no matches, bash assumes you meant the literal '*' and > hence will return "/foo/bar/*" in link_source. > So make sure you check the existence of whatever is in link_source > before using it. > > Yup, that's part of the reason why I changed to 'find' rather than 'ls' there. 'find' will return a list matching the criteria, or it'll be empty. Again, why I didn't use it earlier is beyond me. I think 'ls' just worked for me and I moved on to getting other bits to work and forgot about it. As for the lib_dir(), I'm unsure if that's a good way to handle things. Or, if it's really the best way, even though it's ugly. There's nothing preventing me from making it a user configurable...it's just that at some point I do need to determine the default bitness for the applications. - - Aaron -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREIAAYFAk2TDUQACgkQCOhwUhu5AEnnnAD/QPHQ2B3VUlFBQpCBg/8zdXDE StAmxwYONYECac7ZZdYBAK0YW+JZYo4wez/U+OMNz6bMobNJrlC/e8TPgBQrHYd1 =ppf+ -----END PGP SIGNATURE-----