Gentoo Archives: gentoo-dev

From: Pacho Ramos <pacho@g.o>
To: gentoo-dev@l.g.o
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 19:30:25
Message-Id: 1359401406.2927.49.camel@belkin4
In Reply to: Re: readme.gentoo.eclass: use echo -e instead of plain echo (Was: Re: [gentoo-dev] readme.gentoo.eclass: Add a DISABLE_AUTOFORMATTING variable= by Ben de Groot
1 El lun, 28-01-2013 a las 14:37 +0800, Ben de Groot escribió:
2 > On 28 January 2013 12:37, Mike Frysinger <vapier@g.o> wrote:
3 > > On Sunday 27 January 2013 13:21:27 Pacho Ramos wrote:
4 > >> The problem is that it doesn't work so well. If I have the following at
5 > >> src_prepare (for example):
6 > >> src_prepare() {
7 > >> DOC_CONTENTS="You must create a symlink rom /etc/splash/tuxonice
8 > >> to the theme you want tuxonice to use, e.g.: \n
9 > >> # ln -sfn /etc/splash/emergence /etc/splash/tuxonice \n"
10 > >> ...
11 > >>
12 > >> and I handle ${DOC_CONTENTS} with quotes, it will end writing that tabs
13 > >> also in generated file as the contents of the variable will be put
14 > >> as-is. On the other hand, if I don't put it between quotes
15 > >
16 > > forcibly normalizing whitespace for all callers is wrong imo (as is sending it
17 > > through `fmt`). if the caller gave you content to write, it should write it.
18 > > if the caller didn't want tabs, it shouldn't have used it in the first place.
19 > > -mike
20 >
21 > I've started using this eclass, but with README files, not the variable,
22 > because this is currently the only way I can make sure it honours my
23 > formatting.
24 >
25
26 Couldn't it be covered if "echo -e" was used (even with fmt) and you,
27 then, control formatting with some of the sequences it allows (they are
28 shown in its man page)?

Attachments

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

Replies