Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-dev@l.g.o, hasufell@g.o, amd64@g.o, toolchain@g.o
Subject: [gentoo-dev] Re: [PATCH multilib.eclass] Distinguish between unset and empty variables when restoring.
Date: Sat, 20 Apr 2013 06:08:07
Message-Id: 201304200210.22979.vapier@gentoo.org
In Reply to: [gentoo-dev] [PATCH multilib.eclass] Distinguish between unset and empty variables when restoring. by "Michał Górny"
1 On Saturday 20 April 2013 01:12:20 Michał Górny wrote:
2 > for v in CHOST CBUILD AS CC CXX LD PKG_CONFIG_{LIBDIR,PATH} ; do
3 > vv="__abi_saved_${v}"
4 > - export ${v}="${!vv}"
5 > + unset ${v}
6 > + [[ ${!vv+1} ]] && export ${v}="${!vv}"
7 > unset ${vv}
8
9 merge the two unset commands. no need to run it twice.
10 -mike

Attachments

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

Replies