[31353] trunk/base/src/port1.0/portutil.tcl
nox at macports.org
nox at macports.org
Tue Nov 20 18:39:31 PST 2007
Revision: 31353
http://trac.macosforge.org/projects/macports/changeset/31353
Author: nox at macports.org
Date: 2007-11-20 18:39:29 -0800 (Tue, 20 Nov 2007)
Log Message:
-----------
portutil.tcl, in {{{[command_string]}}}:
* Removed two useless global imports.
* Now uses {{{[append cmdstring "..."]}}} instead of {{{[set stringcmd "$stringcmd ..."]}}}, which is faster, as said in append(n) manpage.
Modified Paths:
--------------
trunk/base/src/port1.0/portutil.tcl
Modified: trunk/base/src/port1.0/portutil.tcl
===================================================================
--- trunk/base/src/port1.0/portutil.tcl 2007-11-21 02:18:07 UTC (rev 31352)
+++ trunk/base/src/port1.0/portutil.tcl 2007-11-21 02:39:29 UTC (rev 31353)
@@ -215,27 +215,28 @@
# Given a command name, assemble a command string
# composed of the command options.
proc command_string {command} {
- global ${command}.dir ${command}.pre_args ${command}.args ${command}.post_args ${command}.env ${command}.type ${command}.cmd
+ global ${command}.dir ${command}.pre_args ${command}.args ${command}.post_args ${command}.cmd
- set cmdstring ""
if {[info exists ${command}.dir]} {
- set cmdstring "cd \"[set ${command}.dir]\" &&"
+ append cmdstring "cd \"[set ${command}.dir]\" &&"
}
if {[info exists ${command}.cmd]} {
foreach string [set ${command}.cmd] {
- set cmdstring "$cmdstring $string"
+ append cmdstring " $string"
}
} else {
- set cmdstring "$cmdstring ${command}"
+ append cmdstring " ${command}"
}
+
foreach var "${command}.pre_args ${command}.args ${command}.post_args" {
if {[info exists $var]} {
foreach string [set ${var}] {
- set cmdstring "$cmdstring $string"
+ append cmdstring " ${string}"
}
}
}
+
ui_debug "Assembled command: '$cmdstring'"
return $cmdstring
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071120/5f88bc39/attachment.html
More information about the macports-changes
mailing list