Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Steve Long <slong@...>
Subject: Re: Re: [gentoo-commits] gentoo-x86 commit in net-wireless/hostapd: ChangeLog hostapd-0.4.9.ebuild hostapd-0.6.1.ebuild hostapd-0.6.0.ebuild
Date: Thu, 13 Dec 2007 13:48:12 +0000
Mike Frysinger wrote:

> On Tuesday 11 December 2007, Denis Dupeyron wrote:
>> On Dec 11, 2007 6:03 AM, Mike Frysinger <vapier@g.o> wrote:
>> > On Monday 10 December 2007, Donnie Berkholz wrote:
>> > >       {
>> > >               ...
>> > >               echo "CONFIG_EAP_SAKE=y"
>> > >               ...
>> > >       } >> ${CONFIG}
>> >
>> > cat <<-EOF >> ${CONFIG}
>> > ...
>> > CONFIG_EAP_SAKE=y
>> > ...
>> > EOF
>>
>> Is what you are suggesting better ? If so, why ?
> 
> no scoping/subshells and obvious break between content (the stuff between
> EOF) and the commands to get it in there (no echos, just one cat)
++, although the filename should be quoted ("$CONFIG" or "${CONFIG}")
Also, in this case, there are no variables being expanded in the heredoc, so
it makes sense to quote 'EOF':
cat <<-'EOF' >> "$CONFIG"
...
EOF
(take off the - sign to keep indentation)

Personally I prefer using embedded multiline echo:
echo '
CONFIG_FOO
CONFIG_BAR
CONFIG_BLAH
' >> "$CONFIG"
since it avoids the fork of an external binary (double-quotes allow variable
expansion) but it is a bashism iirc.


-- 
gentoo-dev@g.o mailing list


Replies:
Re: Re: Re: [gentoo-commits] gentoo-x86 commit in net-wireless/hostapd: ChangeLog hostapd-0.4.9.ebuild hostapd-0.6.1.ebuild hostapd-0.6.0.ebuild
-- Mike Frysinger
References:
Re: Re: [gentoo-commits] gentoo-x86 commit in net-wireless/hostapd: ChangeLog hostapd-0.4.9.ebuild hostapd-0.6.1.ebuild hostapd-0.6.0.ebuild
-- Mike Frysinger
Re: Re: [gentoo-commits] gentoo-x86 commit in net-wireless/hostapd: ChangeLog hostapd-0.4.9.ebuild hostapd-0.6.1.ebuild hostapd-0.6.0.ebuild
-- Denis Dupeyron
Re: Re: [gentoo-commits] gentoo-x86 commit in net-wireless/hostapd: ChangeLog hostapd-0.4.9.ebuild hostapd-0.6.1.ebuild hostapd-0.6.0.ebuild
-- Mike Frysinger
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: Re: [gentoo-commits] gentoo-x86 commit in net-wireless/hostapd: ChangeLog hostapd-0.4.9.ebuild hostapd-0.6.1.ebuild hostapd-0.6.0.ebuild
Next by thread:
Re: Re: Re: [gentoo-commits] gentoo-x86 commit in net-wireless/hostapd: ChangeLog hostapd-0.4.9.ebuild hostapd-0.6.1.ebuild hostapd-0.6.0.ebuild
Previous by date:
Re: diff /usr/portage
Next by date:
Re: EAPI placement


Updated Jun 17, 2009

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.