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 1P628J-0006gg-Ri for garchives@archives.gentoo.org; Wed, 13 Oct 2010 14:16:48 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BCD1DE0972; Wed, 13 Oct 2010 14:16:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id CC75BE096D for ; Wed, 13 Oct 2010 14:16:38 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 60C6D1B4355 for ; Wed, 13 Oct 2010 14:16:38 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/openvpn: ChangeLog openvpn-2.1.3.ebuild Date: Wed, 13 Oct 2010 10:13:58 -0400 User-Agent: KMail/1.13.5 (Linux/2.6.35.4; KDE/4.5.1; x86_64; ; ) References: <20100927113752.CF4CE20051@flycatcher.gentoo.org> <201010121657.12525.vapier@gentoo.org> <1286957369-sup-2279@etiriah> In-Reply-To: <1286957369-sup-2279@etiriah> 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 Content-Type: multipart/signed; boundary="nextPart1343169.aFYz3yzTRB"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201010131013.59083.vapier@gentoo.org> X-Archives-Salt: 36fe65a3-52dd-41dd-8266-c543838610ae X-Archives-Hash: cd31a233fa1f77711bf8368604ae8591 --nextPart1343169.aFYz3yzTRB Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Wednesday, October 13, 2010 04:23:16 Amadeusz =C5=BBo=C5=82nowski wrote: > Excerpts from Mike Frysinger's message of Tue Oct 12 22:57:11 +0200 2010: > > On Tuesday, October 12, 2010 16:26:31 Jeroen Roovers wrote: > > > On Tue, 12 Oct 2010 22:09:06 +0200 Dirkjan Ochtman wrote: > > > > On Fri, Oct 1, 2010 at 15:07, Peter Volkov wrote: > > > > > [a very thorough review of the openvpn ebuild] > > > >=20 > > > > Thanks for reviewing, I've fixed most of the issues. > > > >=20 > > > > >> if [[ -n $(ls /etc/openvpn/*/local.conf 2>/dev/null) ]] ; > > > > >>=20 > > > > >> then > > > > >=20 > > > > > I'd suggested [ -e /etc/openvpn/*/local.conf ] here, but probably > > > > > there are better alternatives. Also ${ROOT} is missed here. > > > >=20 > > > > I've put ${ROOT} in, are there no better alternatives? I don't think > > > > anyone mentioned any. > > >=20 > > > for foo in ${ROOT}/etc/openvpn/*/local.conf; do > > >=20 > > > [ -e ${foo} ] && bar ${foo} > > >=20 > > > done > > >=20 > > > If no ${ROOT}/etc/openvpn/*/local.conf is found, it returns the exact > > > string; which doesn't exist so Nothing Happens. > >=20 > > i'd say doing a loop is worse than a `ls` hack. and this has quoting > > problems, but that's ancillary ... =20 > What about defining following function? >=20 > any_exists() { > local f >=20 > for f; do > [[ -e $f ]] && return 0 > done >=20 > return 1 > } perhaps if it had a better name and were in a common location (eclass) =2Dmike --nextPart1343169.aFYz3yzTRB Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iQIcBAABAgAGBQJMtb6nAAoJEEFjO5/oN/WBWGkP/0L9SMGLze6hICoJmLDxJ0YA ZN7zqTzCC78Y7jzb2S2tiQuCDNpl8hKcEt39o6jpmK10G8b/Y6ZtJn07IWoZsuRO 5K5q4uhyUU84P7+epCPlhMns82ppjJyhre8YMiz78v/0NaUypLhjDFjD0LQ16MA+ 8NEUN7zfh5ckmGrrp3q5UVokCYSiamWMm4dpiIDf9vsoFJmSk0Xq4ojzJeBFPUrV cy1Of9sADiWm1nwIG0zAqWptu+kb9tIS3ykAYIwbouEl8kr6H9DSzAsP44RcYPPk /d0KQq183D6mpTZYCpdJHsjOlm9M6T3nfRjN3H3CgEPkSj6jQB6GjaezMbV96oCz Upm8eGzbl/TE9t+3SZnxIGR3z7FTPU+QIKfEjPeZGDjB0YlVKmzZZbHW/t9zYkn7 rBJWo1DMnisuA3tR8PSVdqVkpuOLoKdtM2bJwuJmdn7mH2AW5l4MufieSorm3ohC 2vaAy5u15ZGdSMn1eEFG8de79++nO2p/TeorT/lUx4spqebeOQcdzTY4tvBm98mp nj6IkR+rHmxge0kHB6ktTckwDtQjR+B0Ez8OzKjcZqz88jLX0vOK7PKyaXLJ1XEY pbvy86drgBk9vBqCIvlBSf9QLJVDvZdloZFtJQDfSL+iO8iIpdu2uHUbvyevuUlj YVuAlx2wkZ94147+VoOq =XOwj -----END PGP SIGNATURE----- --nextPart1343169.aFYz3yzTRB--