Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] eutils.eclass: Add awk wrapper - eawk - edit file in place
Date: Thu, 19 May 2016 18:35:46
Message-Id: 22334.1909.915341.791759@a1i15.kph.uni-mainz.de
In Reply to: Re: [gentoo-dev] [PATCH] eutils.eclass: Add awk wrapper - eawk - edit file in place by Mart Raudsepp
1 >>>>> On Thu, 19 May 2016, Mart Raudsepp wrote:
2
3 >> Ulrich Mueller <ulm@g.o> writes:
4 >> > The EAPI 6 method would be to use "|| die -n". Then the caller
5 >> > either call "eawk" if the function should die automatically, or
6 >> > "nonfatal eawk" if it should return with an error status.
7
8 > Don't you possibly need a || return as well in there if it isn't the
9 > last things in the function?
10
11 Yes, of course. "|| die -n || return" if you want the function to
12 return at that point, if it was called under nonfatal.
13
14 > https://blogs.gentoo.org/mgorny/2015/11/13/the-ultimate-guide-to-eapi-6
15
16 Note that the ${?} in the code example there is redundant.
17
18 Ulrich

Replies