Re: MASTER_SITES with DISTVERSION substitution "S:/./-/"
Date: Tue, 27 Dec 2022 12:06:41 UTC
Hi Eduardo, Just like with sed(1), append a g modifier to substitute each occurrence: ${DISTVERSION:S/./-/g} Yours, Robert Clausecker Am Tue, Dec 27, 2022 at 12:03:04PM +0000 schrieb Nuno Teixeira: > Hello all, > > I'm working in a port (267717 > <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267717>) with a source > tarball hosted in github: > > https://github.com/root-project/root/releases/download/v6-26-10/root_v6.26.10.source.tar.gz > --- > PORTNAME= root > DISTVERSION= 6.26.10 > CATEGORIES= devel science math parallel python > MASTER_SITES= > https://github.com/root-project/root/releases/download/v${DISTVERSION:S/./-/:S/./-/}/ > DISTNAME= ${PORTNAME}_v${DISTVERSION}.source > --- > > Is there a better way of replacing "." with "-" without using "S:///" 2 > times: > ${DISTVERSION:S/./-/:S/./-/}/ > Using only one :S/./-/ will substitute the first match "6-26.10" > > Thanks, > > > -- > Nuno Teixeira > FreeBSD Committer (ports) -- () ascii ribbon campaign - for an 8-bit clean world /\ - against html email - against proprietary attachments