El dom, 27-01-2013 a las 15:00 +0100, Pacho Ramos escribió: > Currently, when people uses DOC_CONTENTS variable to place their desired > messages, they are automatically reformatted by "fmt" to get proper > messages (for example, splitting long lines). > > But, in some cases, may be useful to disable this behavior and respect > strictly how DOC_CONTENTS was formatted, for example in that kind of > messages telling people to run a command and, then, requiring a new line > to be used. This can also be useful to append extra information to > DOC_CONTENTS when, for example, additional info is needed when enabling > a USE flag. > >
Well, after reading man echo I see all this is not needed, I simply need to use echo -e to get it understand "\n" to create new lines New patch attached
--- /home/pacho/gentoo-x86/eclass/readme.gentoo.eclass 2013-01-24 22:38:41.000000000 +0100 +++ /usr/portage/eclass/./readme.gentoo.eclass 2013-01-27 18:41:40.000000000 +0100 @@ -53,7 +53,7 @@ if [[ -n "${DOC_CONTENTS}" ]]; then eshopts_push set -f - echo ${DOC_CONTENTS} | fmt > "${T}"/README.gentoo + echo -e ${DOC_CONTENTS} | fmt > "${T}"/README.gentoo eshopts_pop dodoc "${T}"/README.gentoo else
signature.asc
Description: This is a digitally signed message part