From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 07A7E1381F3 for ; Sat, 20 Apr 2013 15:45:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5B03EE0ABE; Sat, 20 Apr 2013 15:45:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 64333E0AB7 for ; Sat, 20 Apr 2013 15:45:14 +0000 (UTC) Received: from pomiocik.lan (178-37-186-237.adsl.inetia.pl [178.37.186.237]) (using SSLv3 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id E5F8033DBFE; Sat, 20 Apr 2013 15:45:11 +0000 (UTC) Date: Sat, 20 Apr 2013 17:42:42 +0200 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-dev@lists.gentoo.org Cc: vapier@gentoo.org, hasufell@gentoo.org, amd64@gentoo.org, toolchain@gentoo.org Subject: Re: [gentoo-dev] Re: [PATCH multilib.eclass] Distinguish between unset and empty variables when restoring. Message-ID: <20130420174242.4ca7eae5@pomiocik.lan> In-Reply-To: <201304200210.22979.vapier@gentoo.org> References: <1366434740-1265-1-git-send-email-mgorny@gentoo.org> <201304200210.22979.vapier@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.17; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA512; boundary="Sig_/qF5UU/fEnVh_W3bwndnPNag"; protocol="application/pgp-signature" X-Archives-Salt: 29073f84-6c9b-43e4-8bf7-9f54bc782d10 X-Archives-Hash: 337ac5e35a1f4d3e50027da38b927ead --Sig_/qF5UU/fEnVh_W3bwndnPNag Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, 20 Apr 2013 02:10:20 -0400 Mike Frysinger wrote: > On Saturday 20 April 2013 01:12:20 Micha=C5=82 G=C3=B3rny wrote: > > for v in CHOST CBUILD AS CC CXX LD PKG_CONFIG_{LIBDIR,PATH} ; do > > vv=3D"__abi_saved_${v}" > > - export ${v}=3D"${!vv}" > > + unset ${v} > > + [[ ${!vv+1} ]] && export ${v}=3D"${!vv}" > > unset ${vv} >=20 > merge the two unset commands. no need to run it twice. How would I do this? If I do both before the 'export', I lose the original value. If I do both after the 'export', I lose the value I just exported. --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/qF5UU/fEnVh_W3bwndnPNag Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQJ8BAEBCgBmBQJRcrdyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ1RUJGMjBGOTk2RkIzQzIyQ0M2RkNBNDBC QUJGMUQ1RkY4QzgxMTBBAAoJELq/HV/4yBEKFKcP/3Y5hqCaaamx96K+dS8d3fhS 7+UDiYKuPdVmRa1rZlQ8SDup8kNTmL3NOMoBxD9G4erBe/Nji3ztIWav8NNw7GNs jVnczuaWuZSU7VO8ZbPvvE2MR3ZmIcYZeNg8h/SnPFHJuJjkf0tT5AP43aREv6VV Qan3tM7dHbzdtnz2NFj93NrZRW0NTmPZpyqlUWNpmVfstsOqORWvpNo2MzKLRSE0 ClPSNHjl3zvwaSsgugiZsDgjm5tEZcVKsAuf2RRRwM3cUQ4MHi1+gRK+iaeyHDEB KlesP2Sdooe+n+e13Yv2FyG2h6xGUQeJwzLbGEZsK79ty4eDVNC5HppkT7M0cGL4 toEgt0jxqYm+6ufJ4klCQLGg9qCZ/+XqjX5niNAmLC18quBrEjbFPL4SAKAc820p esI8yMLIFcN4MzUjLNu/EcM7lewScdCfd7uYuvqTt6iNQaeDP1yjRjXdhj3NbYGb +zkFB9F197IvrhFtlcOPulZJB3hcEy0Ibv8SzmIPDpopjJ4aESNrWVpiaCGUXduJ jZlhYaujqskqdLPoS3GOMuMVxvwvUETQd7Y/jDMHH+FIh2XZ1+hbgdJpE3Ijvgjc mwtVbRLUj0Be9AHbrL4emIrenTG0mSZT+qGrQBMlSAXwZtK5m/DsXyAux4GVu4zu y2T1B5+GG/tNVaacyc3c =uVOE -----END PGP SIGNATURE----- --Sig_/qF5UU/fEnVh_W3bwndnPNag--