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 CECE8138725 for ; Tue, 29 Jan 2013 02:28:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 95CAB21C01B; Tue, 29 Jan 2013 02:27:54 +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 A4595E066B for ; Tue, 29 Jan 2013 02:27:53 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id C9E5133DBC1 for ; Tue, 29 Jan 2013 02:27:52 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-dev@lists.gentoo.org Subject: Re: readme.gentoo.eclass: use echo -e instead of plain echo (Was: Re: [gentoo-dev] readme.gentoo.eclass: Add a DISABLE_AUTOFORMATTING variable= Date: Mon, 28 Jan 2013 21:28:11 -0500 User-Agent: KMail/1.13.7 (Linux/3.7.1; KDE/4.6.5; x86_64; ; ) References: <1359295221.2927.24.camel@belkin4> <1359401406.2927.49.camel@belkin4> In-Reply-To: <1359401406.2927.49.camel@belkin4> 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; boundary="nextPart1414038.hMRHEZq7eP"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201301282128.12147.vapier@gentoo.org> X-Archives-Salt: 682788d4-3aa4-42ef-b894-d3ac2a87dc37 X-Archives-Hash: 4110f254e2ffb409cce36a9692e8f2ff --nextPart1414038.hMRHEZq7eP Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Monday 28 January 2013 14:30:06 Pacho Ramos wrote: > El lun, 28-01-2013 a las 14:37 +0800, Ben de Groot escribi=C3=B3: > > On 28 January 2013 12:37, Mike Frysinger wrote: > > > On Sunday 27 January 2013 13:21:27 Pacho Ramos wrote: > > >> The problem is that it doesn't work so well. If I have the following > > >> at src_prepare (for example): > > >> src_prepare() { > > >>=20 > > >> DOC_CONTENTS=3D"You must create a symlink rom > > >> /etc/splash/tuxonice > > >> to the theme you want tuxonice to use, e.g.: \n > > >> # ln -sfn /etc/splash/emergence > > >> /etc/splash/tuxonice \n" > > >> ... > > >>=20 > > >> and I handle ${DOC_CONTENTS} with quotes, it will end writing that > > >> tabs also in generated file as the contents of the variable will be > > >> put as-is. On the other hand, if I don't put it between quotes > > >=20 > > > forcibly normalizing whitespace for all callers is wrong imo (as is > > > sending it through `fmt`). if the caller gave you content to write, > > > it should write it. if the caller didn't want tabs, it shouldn't have > > > used it in the first place. > >=20 > > I've started using this eclass, but with README files, not the variable, > > because this is currently the only way I can make sure it honours my > > formatting. >=20 > Couldn't it be covered if "echo -e" was used (even with fmt) and you, > then, control formatting with some of the sequences it allows (they are > shown in its man page)? how is it better to require people to fill the string with \x20\n\t than to= =20 respect what was given ? if people want to normalize whitespace themselves= ,=20 they could just as easily do the `echo` themselves. =2Dmike --nextPart1414038.hMRHEZq7eP Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJRBzO8AAoJEEFjO5/oN/WBDPwP/0alfAeVJcfraxWgXcDVSZPj R3AsthJKmPAFYw1UWn4rwsLCMwTYZB/m1uVhcV/YSaI8t0dR3YFtGeifKFSVObRN OIuhPXjC8wITQpedL8ia5FgEMOltFmPwFAbhQLtoDJ+H8qFeeryo8dNB1WT9nb/O F2QSEaYcy+17jxhtvgRWa17HuZS16qsqkty1QPoZ1lOzu0UBCvSPqI800FM9Rdg4 XDxvT2uTv9p/GDRm2uHw8sSeinuVGJ7y0ViQCrx7qHch5yetU/Y+P6u33/rGZeal zWAO9lTQfUB6sNGy8fXkffnGgHkb/mUDGvoXZDuUsnEgnB8rrBemClchHL+leAES Ymjg+KibwWWNhY1/TzZuOfBXlMKTF4HLgLea2Xx8PAB5Z1wAFYjS32glfaK+AY07 H7eGX1do0uhevqee+d4CSb+JRyjoRxim8la+IbiCsY/XHpZRAhTube58AqoHHKB3 mncJIGkKFr91FWtAqUXu4UXfMrQywzHOkdU/xitZ/ZeCggtzCvfH8S6Mx5Z8eFa/ HXv8g9J6d+rehVvcMyz3W9PwWS3wnryHEX0QO9KODmg3bzxL5GvseUhOI/LUc+C4 Hsqjy9ggNmA6TlBmAnPOOr/wH7qn6IpCD0A0H8A3dn/MUjzFPP9UatH03Tps15ZK qFF8N4JAO12t9VUkHqnA =uIc/ -----END PGP SIGNATURE----- --nextPart1414038.hMRHEZq7eP--