[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gentoo-dev
Subject:    Re: [gentoo-dev] readme.gentoo.eclass: expand variables when a file is used instead of setting DOC_C
From:       Ulrich Mueller <ulm () gentoo ! org>
Date:       2014-08-31 12:29:58
Message-ID: 21507.5446.75540.454951 () a1i15 ! kph ! uni-mainz ! de
[Download RAW message or body]


>>>>> On Sun, 31 Aug 2014, Pacho Ramos wrote:

> This tries to solve:
> https://bugs.gentoo.org/show_bug.cgi?id=519682

-		cp "${FILESDIR}/README.gentoo-${SLOT%/*}" "${T}"/README.gentoo || die
+		eval echo $(cat "${FILESDIR}/README.gentoo-${SLOT%/*}") > "${T}"/README.gentoo || die

Am I missing something, or will this destroy any formatting (like line
breaks) within the file?

> Looks to do the job but maybe there are shorter or saner ways of
> doing it

If the goal is to expand variables like PF, then I think a solution
like the one indicated in comment #2 of above-mentioned bug would be
safer, i.e. expand @PF@ etc. to the respective variables. This can be
done with sed.

Ulrich

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic