[137943] branches/gsoc15-portfile/github2port/github2port

Chunyang Xu chunyang at macports.org
Tue Jun 23 10:22:08 PDT 2015


On Wed, Jun 24, 2015 at 1:11 AM, Lawrence Velázquez <larryv at macports.org> wrote:
> On Jun 23, 2015, at 1:06 PM, chunyang at macports.org wrote:
>
> Revision137943Authorchunyang at macports.orgDate2015-06-23 10:06:03 -0700 (Tue,
> 23 Jun 2015)
>
> Log Message
>
> github2port: Simplify regexp use and use list rather than concat for making
> proc return
>
> Modified Paths
>
> branches/gsoc15-portfile/github2port/github2port
>
>
> +    set res {}
> +
>      set path [split $urlparts(path) /]
> -    set author [lindex $path 0]
> -    set project [lindex $path 1]
> +    set author [lindex $path 0] ; lappend res $author
> +    set project [lindex $path 1] ; lappend res $project
> +
>      set tarball [lindex $path end]
> +    foreach i [parse_tarball_name $tarball] {
> +        lappend res $i
> +    }
>
>      set tarball_from [expr {[string match */releases/download/* $url] ?
> "release" : ""}]
> +    lappend res $tarball_from
>
> -    return [concat $author $project [parse_tarball_name $tarball]
> $tarball_from]
> +    return $res
>  }
>
>
> I think this would be clearer if you used the "list" command:
>
> return [list $author $project {*}[parse_tarball_name $tarball]
> $tarball_from]
>

just changed. I'm looking for doc for {*} though I have used it once before.


> vq


More information about the macports-dev mailing list