[aur-general] [AUR4] Single binary package for different architectures
Patrick Burroughs (Celti)
celti at celti.name
Thu Jun 25 17:07:44 UTC 2015
On Thu, 25 Jun 2015 17:01:02 +0200 Johannes Löthberg
<johannes at kyriasis.com> wrote:
> On 25/06, Patrick Burroughs wrote:
> >On Thu, 25 Jun 2015 13:17:49 +0100 Mauro Santos
> ><registo.mailling at gmail.com> wrote:
> >> Wouldn't just
> >>
> >> local tarball="${source_$CARCH[0]}"
> >>
> >> or something very similar do the job?
> >
> >I believe you need:
> >
> >local tarball=$(eval "echo \${source_${CARCH}[0]}")
> >
>
> Why do you believe that?
A quick google and some personal testing showed me that the former
doesn't work and the latter does, because bash doesn't interpolate
variables in the middle of another variable like that; you need to use
eval to make a second pass for it to work. Rather hacky, though, and I
see no point in using it over the conditional construct proposed
earlier — I just hate to see a suggestion that doesn't work out there.
--
Patrick Burroughs (Celti) <celti at celti.name>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/aur-general/attachments/20150625/9c8be887/attachment.asc>
More information about the aur-general
mailing list