El dom, 31-08-2014 a las 14:29 +0200, Ulrich Mueller escribió:
> >>>>> 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?

What about
while read; do eval echo "$REPLY"; done <
"${FILESDIR}/README.gentoo-${SLOT%/*}" > "${T}"/README.gentoo || die

?

> 
> > 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

But, if I don't misunderstand, wouldn't it need an explicit substitution
for each variable people tries to use? (I mean, for now it's $PF, but
maybe other people want to expand $HOMEPAGE, $PN...)

Thanks


Reply via email to