[114592] trunk/dports/_resources/port1.0/group/github-1.0.tcl

mww at macports.org mww at macports.org
Tue Dec 10 23:33:11 PST 2013


Revision: 114592
          https://trac.macports.org/changeset/114592
Author:   mww at macports.org
Date:     2013-12-10 23:33:11 -0800 (Tue, 10 Dec 2013)
Log Message:
-----------
be more intractable in the search for the worksrcdir

Modified Paths:
--------------
    trunk/dports/_resources/port1.0/group/github-1.0.tcl

Modified: trunk/dports/_resources/port1.0/group/github-1.0.tcl
===================================================================
--- trunk/dports/_resources/port1.0/group/github-1.0.tcl	2013-12-11 02:08:31 UTC (rev 114591)
+++ trunk/dports/_resources/port1.0/group/github-1.0.tcl	2013-12-11 07:33:11 UTC (rev 114592)
@@ -78,14 +78,19 @@
     distname                ${github.project}-${github.version}
     fetch.ignore_sslcert    yes
 
+    # if worksrcpath does not exist, try to guess the directory that should be and rename it
     post-extract {
         if {![file exists ${worksrcpath}] && \
                 ${fetch.type} eq "standard" && \
                 ${master_sites} eq ${github.master_sites} && \
                 [llength ${distfiles}] > 0 && \
-                [llength [glob -nocomplain ${workpath}/*]] > 0 && \
-                [file isdirectory [glob ${workpath}/*]]} {
-            move [glob ${workpath}/*] ${worksrcpath}
+                [llength [glob -nocomplain ${workpath}/*]] > 0} {
+            foreach item [glob ${workpath}/*] {
+                if {[file isdirectory ${item}]} {
+                    move ${item} ${worksrcpath}
+                    break
+                }
+            }
         }
     }
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20131210/c247e8b9/attachment.html>


More information about the macports-changes mailing list