Opened 10 years ago

Closed 10 years ago

#44805 closed enhancement (fixed)

Added livecheck to mksh

Reported by: Schamschula (Marius Schamschula) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: haspatch maintainer Cc:
Port: mksh

Description

I've added livecheck to mksh.

Attachments (1)

Portfile-mksh.diff (390 bytes) - added by Schamschula (Marius Schamschula) 10 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

I think your second backslash migrated a bit:

${name}-(\[R0-9.\abcdefg]+)${extract.suffix}

Note how when you run livecheck, the "\a" disappears from the regex (because an escaped "a" has no meaning in regex syntax):

DEBUG: The regex is "mksh-([R0-9.bcdefg]+).tgz"

The backslash belongs before the closing square bracket:

${name}-(\[R0-9.abcdefg\]+)${extract.suffix}

Also, note that you're defining a character class here. You're saying you want to match a sequence of 1 or more characters from the set "0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f, g, R, period", in any order. Looking at the download directory, I think we can be more precise than that. All the existing versions begin with "R", then have at least one digit, and then optionally a letter suffix. So we could write:

${name}-(R\[0-9\]+\[a-z\]*)${extract.suffix}

comment:2 Changed 10 years ago by Schamschula (Marius Schamschula)

Ryan,

Good catch (I'm not the greatest regex expert).

Updated the regex as per your suggestion.

Changed 10 years ago by Schamschula (Marius Schamschula)

Attachment: Portfile-mksh.diff added

comment:3 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.