Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: vapier@g.o, hasufell@g.o, amd64@g.o, toolchain@g.o
Subject: Re: [gentoo-dev] Re: [PATCH multilib.eclass] Distinguish between unset and empty variables when restoring.
Date: Sat, 20 Apr 2013 15:45:20
Message-Id: 20130420174242.4ca7eae5@pomiocik.lan
In Reply to: [gentoo-dev] Re: [PATCH multilib.eclass] Distinguish between unset and empty variables when restoring. by Mike Frysinger
1 On Sat, 20 Apr 2013 02:10:20 -0400
2 Mike Frysinger <vapier@g.o> wrote:
3
4 > On Saturday 20 April 2013 01:12:20 Michał Górny wrote:
5 > > for v in CHOST CBUILD AS CC CXX LD PKG_CONFIG_{LIBDIR,PATH} ; do
6 > > vv="__abi_saved_${v}"
7 > > - export ${v}="${!vv}"
8 > > + unset ${v}
9 > > + [[ ${!vv+1} ]] && export ${v}="${!vv}"
10 > > unset ${vv}
11 >
12 > merge the two unset commands. no need to run it twice.
13
14 How would I do this? If I do both before the 'export', I lose
15 the original value. If I do both after the 'export', I lose the value
16 I just exported.
17
18 --
19 Best regards,
20 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies