From: "Amadeusz Żołnowski" <aidecoe@aidecoe.name>
To: gentoo-dev <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 18:36:49 +0200 [thread overview]
Message-ID: <1286987427-sup-9873@etiriah> (raw)
In-Reply-To: <201010131013.59083.vapier@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 1903 bytes --]
Excerpts from Mike Frysinger's message of Wed Oct 13 16:13:58 +0200 2010:
> On Wednesday, October 13, 2010 04:23:16 Amadeusz Żołnowski 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]
> > > > >
> > > > > Thanks for reviewing, I've fixed most of the issues.
> > > > >
> > > > > >> if [[ -n $(ls /etc/openvpn/*/local.conf 2>/dev/null) ]] ;
> > > > > >>
> > > > > >> then
> > > > > >
> > > > > > I'd suggested [ -e /etc/openvpn/*/local.conf ] here, but probably
> > > > > > there are better alternatives. Also ${ROOT} is missed here.
> > > > >
> > > > > I've put ${ROOT} in, are there no better alternatives? I don't think
> > > > > anyone mentioned any.
> > > >
> > > > for foo in ${ROOT}/etc/openvpn/*/local.conf; do
> > > >
> > > > [ -e ${foo} ] && bar ${foo}
> > > >
> > > > done
> > > >
> > > > If no ${ROOT}/etc/openvpn/*/local.conf is found, it returns the exact
> > > > string; which doesn't exist so Nothing Happens.
> > >
> > > i'd say doing a loop is worse than a `ls` hack. and this has quoting
> > > problems, but that's ancillary ...
>
> > What about defining following function?
> >
> > any_exists() {
> > local f
> >
> > for f; do
> > [[ -e $f ]] && return 0
> > done
> >
> > return 1
> > }
>
> perhaps if it had a better name and were in a common location (eclass)
> -mike
So give it a better name. :-) In this case 'ls' shouldn't hurt anybody,
but such function solves problem in much more elegant manner -
regardless it's definied in an ebuild or eclass.
--
Amadeusz Żołnowski
PGP key fpr: C700 CEDE 0C18 212E 49DA 4653 F013 4531 E1DB FAB5
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2010-10-13 16:37 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100927113752.CF4CE20051@flycatcher.gentoo.org>
2010-10-01 13:07 ` [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-misc/openvpn: ChangeLog openvpn-2.1.3.ebuild Peter Volkov
2010-10-01 13:34 ` Thomas Sachau
2010-10-01 15:17 ` Nirbheek Chauhan
2010-10-02 3:38 ` Ryan Hill
2010-10-02 12:32 ` Nirbheek Chauhan
2010-10-05 4:20 ` Jeroen Roovers
2010-10-12 20:09 ` Dirkjan Ochtman
2010-10-12 20:17 ` Mike Frysinger
2010-10-12 20:26 ` Jeroen Roovers
2010-10-12 20:57 ` Mike Frysinger
2010-10-13 8:23 ` Amadeusz Żołnowski
2010-10-13 14:13 ` Mike Frysinger
2010-10-13 16:36 ` Amadeusz Żołnowski [this message]
2010-10-13 16:41 ` Michał Górny
2010-10-13 16:51 ` Amadeusz Żołnowski
2010-10-13 17:26 ` Michał Górny
2010-10-13 18:04 ` Mike Frysinger
2010-10-13 18:51 ` Mike Frysinger
2010-10-13 19:20 ` Amadeusz Żołnowski
2010-10-13 19:57 ` Amadeusz Żołnowski
2010-10-13 21:46 ` Mike Frysinger
2010-10-13 22:13 ` Amadeusz Żołnowski
2010-10-13 22:32 ` Mike Frysinger
2010-10-13 23:08 ` Amadeusz Żołnowski
2010-10-17 21:33 ` Mike Frysinger
2010-10-17 23:06 ` Amadeusz Żołnowski
2010-10-18 7:08 ` Michał Górny
2010-10-18 18:06 ` Mike Frysinger
2010-10-18 18:25 ` Mike Frysinger
2010-10-19 4:03 ` Michał Górny
2010-10-13 19:37 ` Ulrich Mueller
2010-10-13 21:45 ` Mike Frysinger
2010-10-17 21:35 ` Mike Frysinger
[not found] <fyNx7-2Qx-7@gated-at.bofh.it>
[not found] ` <fCTuh-8on-5@gated-at.bofh.it>
[not found] ` <fCTDX-aL-5@gated-at.bofh.it>
[not found] ` <fCUgF-1kl-15@gated-at.bofh.it>
2010-10-13 7:08 ` Vaeth
2010-10-13 14:15 ` Mike Frysinger
[not found] <fD3Dj-k9-9@gated-at.bofh.it>
[not found] ` <fD3Dj-k9-15@gated-at.bofh.it>
[not found] ` <fD3Dj-k9-7@gated-at.bofh.it>
[not found] ` <fDbhw-4Y2-5@gated-at.bofh.it>
2010-10-13 16:35 ` Vaeth
2010-10-13 18:07 ` Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1286987427-sup-9873@etiriah \
--to=aidecoe@aidecoe.name \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox