From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SZmV6-0008RG-2w for garchives@archives.gentoo.org; Wed, 30 May 2012 17:16:00 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 76940E0790; Wed, 30 May 2012 17:15:51 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A295EE0777 for ; Wed, 30 May 2012 17:15:14 +0000 (UTC) Received: from pomiocik.lan (77-253-135-71.adsl.inetia.pl [77.253.135.71]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 2035164204; Wed, 30 May 2012 17:15:12 +0000 (UTC) Date: Wed, 30 May 2012 19:16:15 +0200 From: =?UTF-8?B?TWljaGHFgiBHw7Nybnk=?= To: gentoo-dev@lists.gentoo.org Cc: slong@rathaus.eclipse.co.uk Subject: Re: [gentoo-dev] Re: [PATCH eutils] Move remove_libtool_files() from autotools-utils for wider use. Message-ID: <20120530191615.1f84d791@pomiocik.lan> In-Reply-To: References: <1338191936-2091-1-git-send-email-mgorny@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; 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-SHA256; boundary="Sig_/4i/RAF3+85vKW7HFgT_JDel"; protocol="application/pgp-signature" X-Archives-Salt: 4a1b6716-dbf3-422d-ad96-448c2f2450aa X-Archives-Hash: 9586c8aca36f440bc6abaa7e6a6a65a5 --Sig_/4i/RAF3+85vKW7HFgT_JDel Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, 29 May 2012 14:50:19 +0100 Steven J Long wrote: > Micha=C5=82 G=C3=B3rny wrote: >=20 > > + find "${D}" -type f -name '*.la' -print0 | while read -r -d '' > > f;=20 > .. > > + rm -f "${f}" || die > .. > > + done >=20 > Don't pipe to read like that; it means the final command is in a > subshell and "die is /not/ guaranteed to work correctly if called > from a subshell environment."[1] Didn't we actually change that in the past? I think I'm recalling something like that... > More seriously, the script doesn't actually get the correct > filenames, despite being written to handle any filename. > eg: > $ touch $' foo bar \n\t ' > $ while read -r -d '' f; do echo "'$f'"; done < <(find . -type f > -print0) './ foo bar' >=20 > You do it like this: >=20 > while read -rd ''; do > f=3D$REPLY; > .. > done < <(find "$D" -type f -name '*.la' -print0) Thanks. --=20 Best regards, Micha=C5=82 G=C3=B3rny --Sig_/4i/RAF3+85vKW7HFgT_JDel Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iJwEAQEIAAYFAk/GVeAACgkQfXuS5UK5QB1QKwQArIOU0HDMiGwbxQMySOMXK1K8 fKrMlj+YvD6SKaMzUJhsp0u8FBiWFzOhpcnUYs2CgGhlT27ZI41Gtg7UU5kzWfOM /a9kO7FGVo/b55DfRtnC1SdjCsydEJFB58+l/AW9kBxZtcCMejEMazuo5FmgmNXP aY0fshhZVPjhiwmXkxU= =HwFS -----END PGP SIGNATURE----- --Sig_/4i/RAF3+85vKW7HFgT_JDel--