Gentoo Archives: gentoo-dev

From: Ulrich Mueller <ulm@g.o>
To: "Amadeusz Żołnowski" <aidecoe@g.o>
Cc: Ulrich Mueller <ulm@g.o>, gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] eutils.eclass: Add awk wrapper - eawk - edit file in place
Date: Fri, 20 May 2016 09:31:46
Message-Id: 22334.55664.6694.129691@a1i15.kph.uni-mainz.de
In Reply to: Re: [gentoo-dev] [PATCH] eutils.eclass: Add awk wrapper - eawk - edit file in place by "Amadeusz Żołnowski"
1 >>>>> On Thu, 19 May 2016, Amadeusz Żołnowski wrote:
2
3 > Ulrich Mueller <ulm@g.o> writes:
4 >> Yes, of course. "|| die -n || return" if you want the function to
5 >> return at that point, if it was called under nonfatal.
6 >>
7 >>> https://blogs.gentoo.org/mgorny/2015/11/13/the-ultimate-guide-to-eapi-6
8 >>
9 >> Note that the ${?} in the code example there is redundant.
10
11 > Why redundant? I imagine we can call it like:
12
13 > if ! nonfatal efoo; then
14 > do_something_on_error
15 > fi
16
17 > can't we?
18
19 The status of the last command will be returned in any case, so there
20 is no difference between "|| return" and "|| return $?".
21
22 Ulrich