Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@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 04:37:01
Message-Id: 201301272337.06614.vapier@gentoo.org
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 Pacho Ramos
1 On Sunday 27 January 2013 13:21:27 Pacho Ramos wrote:
2 > The problem is that it doesn't work so well. If I have the following at
3 > src_prepare (for example):
4 > src_prepare() {
5 > DOC_CONTENTS="You must create a symlink rom /etc/splash/tuxonice
6 > to the theme you want tuxonice to use, e.g.: \n
7 > # ln -sfn /etc/splash/emergence /etc/splash/tuxonice \n"
8 > ...
9 >
10 > and I handle ${DOC_CONTENTS} with quotes, it will end writing that tabs
11 > also in generated file as the contents of the variable will be put
12 > as-is. On the other hand, if I don't put it between quotes
13
14 forcibly normalizing whitespace for all callers is wrong imo (as is sending it
15 through `fmt`). if the caller gave you content to write, it should write it.
16 if the caller didn't want tabs, it shouldn't have used it in the first place.
17 -mike

Attachments

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

Replies