[144198] trunk/dports/java/gant/Portfile

ryandesign at macports.org ryandesign at macports.org
Mon Jan 4 09:15:49 PST 2016


Revision: 144198
          https://trac.macports.org/changeset/144198
Author:   ryandesign at macports.org
Date:     2016-01-04 09:15:49 -0800 (Mon, 04 Jan 2016)
Log Message:
-----------
gant: avoid use of system just to create a symlink; avoid use of foreach just to remove multiple files

Modified Paths:
--------------
    trunk/dports/java/gant/Portfile

Modified: trunk/dports/java/gant/Portfile
===================================================================
--- trunk/dports/java/gant/Portfile	2016-01-04 17:14:39 UTC (rev 144197)
+++ trunk/dports/java/gant/Portfile	2016-01-04 17:15:49 UTC (rev 144198)
@@ -37,9 +37,7 @@
 
 pre-destroot {
 	# Remove extraneous bat files
-	foreach f [glob -directory ${worksrcpath}/bin *.bat] {
-		file delete $f
-	}
+    delete {*}[glob -directory ${worksrcpath}/bin *.bat]
 }
 
 destroot	{
@@ -53,7 +51,7 @@
 			  ${destroot}${prefix}/share/java/${name}
 
 	# Symlink gant into the bin directory
-	system "cd ${destroot}${prefix}/bin && ln -s ${prefix}/share/java/${name}/bin/gant"
+    ln -s ${prefix}/share/java/${name}/bin/gant ${destroot}${prefix}/bin
 }
 
 notes "
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160104/4b1c017a/attachment-0001.html>


More information about the macports-changes mailing list