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ó:
> > 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() {
> > >> 
> > >>         DOC_CONTENTS="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"
> > >> ...
> > >> 
> > >> 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
> > > 
> > > 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.
> > 
> > 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.
> 
> 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 
respect what was given ?  if people want to normalize whitespace themselves, 
they could just as easily do the `echo` themselves.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to