Livecheck regex syntax

N_Ox n.oxyde at gmail.com
Wed Aug 15 08:43:00 PDT 2007


Le 15 août 07 à 17:12, Simon Ruderich a écrit :

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> Hi,
>
> I'm working at the livecheck of some packages at the moment and I  
> have a
> question about the regex to use. I think I have to options (here an
> example) to specify the version part of the regex:
>
> 1. livecheck.regex "${name}(.+?) "
> 2. livecheck.regex "${name}(${version}) "
>
> Should I prefer one of these options or it's just my choice and  
> none is
> better then the other.
>
> Thanks for your help,
> Simon
>

${version} is not a pattern, your thing will be ${name}4.3 for example.
So if the newest version available, the regex will not match and port  
will be unable to tell the user a new version is available or not.

I try to as precise as possible in my livechecks, with something  
like: (\d+(?:\.\d+)*)

Regards,

--
Anthony Ramine, the infamous MacPorts Trac slave.
nox at macports.org





More information about the macports-dev mailing list