Ignore:
Timestamp:
Oct 11, 2013, 11:06:45 PM (6 years ago)
Author:
michaelld@…
Message:

github-1.0 PortGroup:

  • compare strings using 'eq';
  • add comment on what the regexp is doing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/github-1.0.tcl

    r102698 r112098  
    5757    # keeping the default at tags like many portfiles already do
    5858    # the port writer can set github.tarball_from to "downloads" and have the URI path accordingly changed
    59     if {[string equal ${action} "set"] && $args == "downloads"} {
     59    if {${action} eq "set" && $args eq "downloads"} {
    6060        github.tarball_from ${args}
    6161        github.master_sites https://github.com/downloads/${github.author}/${github.project}
     
    8080
    8181    post-extract {
    82         if {![file exists ${worksrcpath}] && "standard" == ${fetch.type} && \
    83             ${master_sites} == ${github.master_sites} && [llength ${distfiles}] > 0 && \
    84             [llength [glob -nocomplain ${workpath}/*]] > 0} {
     82        if {![file exists ${worksrcpath}] && \
     83                ${fetch.type} eq "standard" && \
     84                ${master_sites} eq ${github.master_sites} && \
     85                [llength ${distfiles}] > 0 && \
     86                [llength [glob -nocomplain ${workpath}/*]] > 0} {
    8587            move [glob ${workpath}/*] ${worksrcpath}
    8688        }
    8789    }
    8890
    89     if {[join ${github.tag_prefix}] == "" && [regexp "^\[0-9a-f\]{9,}\$" ${github.version}]} {
     91    # If the "commit" string from start to end is in [0-9a-f] to at
     92    # least 9 characters, and no tag is provided, then assume doing
     93    # commits type livecheck; else tags type.
     94
     95    if {[join ${github.tag_prefix}] eq "" && \
     96        [regexp "^\[0-9a-f\]{9,}\$" ${github.version}]} {
    9097        github.livecheck_type commits
    9198    } else {
     
    93100    }
    94101
    95     if {[string equal ${github.livecheck_type} "commits"]} {
     102    if {${github.livecheck_type} eq "commits"} {
    96103        livecheck.type          regexm
    97104        livecheck.url           ${github.homepage}/commits/master.atom
Note: See TracChangeset for help on using the changeset viewer.